浏览代码

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>
Sachin Kamat 11 年之前
父节点
当前提交
8db353bdd0
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/thunderbolt/ctl.c

+ 2 - 2
drivers/thunderbolt/ctl.c

@@ -305,13 +305,13 @@ static struct ctl_pkg *tb_ctl_pkg_alloc(struct tb_ctl *ctl)
 {
 {
 	struct ctl_pkg *pkg = kzalloc(sizeof(*pkg), GFP_KERNEL);
 	struct ctl_pkg *pkg = kzalloc(sizeof(*pkg), GFP_KERNEL);
 	if (!pkg)
 	if (!pkg)
-		return 0;
+		return NULL;
 	pkg->ctl = ctl;
 	pkg->ctl = ctl;
 	pkg->buffer = dma_pool_alloc(ctl->frame_pool, GFP_KERNEL,
 	pkg->buffer = dma_pool_alloc(ctl->frame_pool, GFP_KERNEL,
 				     &pkg->frame.buffer_phy);
 				     &pkg->frame.buffer_phy);
 	if (!pkg->buffer) {
 	if (!pkg->buffer) {
 		kfree(pkg);
 		kfree(pkg);
-		return 0;
+		return NULL;
 	}
 	}
 	return pkg;
 	return pkg;
 }
 }