diff options
author | Sachin Kamat <sachin.kamat@samsung.com> | 2014-06-20 05:02:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-20 12:44:42 -0400 |
commit | 8db353bdd0975c220a62091f4fd28966478550fb (patch) | |
tree | 3a375cc9f82662d61136b46a5eee086ece5d4562 /drivers/thunderbolt | |
parent | c9c2deef457c766a33c4862c9c198c20854d5fb6 (diff) |
thunderbolt: Use NULL instead of 0 in ctl.c
The function returns a pointer. Hence return NULL instead of 0.
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r-- | drivers/thunderbolt/ctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c index d04fee4acb2e..4c6da92edcb4 100644 --- a/drivers/thunderbolt/ctl.c +++ b/drivers/thunderbolt/ctl.c | |||
@@ -305,13 +305,13 @@ static struct ctl_pkg *tb_ctl_pkg_alloc(struct tb_ctl *ctl) | |||
305 | { | 305 | { |
306 | struct ctl_pkg *pkg = kzalloc(sizeof(*pkg), GFP_KERNEL); | 306 | struct ctl_pkg *pkg = kzalloc(sizeof(*pkg), GFP_KERNEL); |
307 | if (!pkg) | 307 | if (!pkg) |
308 | return 0; | 308 | return NULL; |
309 | pkg->ctl = ctl; | 309 | pkg->ctl = ctl; |
310 | pkg->buffer = dma_pool_alloc(ctl->frame_pool, GFP_KERNEL, | 310 | pkg->buffer = dma_pool_alloc(ctl->frame_pool, GFP_KERNEL, |
311 | &pkg->frame.buffer_phy); | 311 | &pkg->frame.buffer_phy); |
312 | if (!pkg->buffer) { | 312 | if (!pkg->buffer) { |
313 | kfree(pkg); | 313 | kfree(pkg); |
314 | return 0; | 314 | return NULL; |
315 | } | 315 | } |
316 | return pkg; | 316 | return pkg; |
317 | } | 317 | } |