Commit ce35e9be authored by Eva Rachel Retuya's avatar Eva Rachel Retuya Committed by Greg Kroah-Hartman

staging: greybus: camera: simplify NULL test

Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for consistency.
Coccinelle semantic patch used:

@@
identifier func;
expression x;
statement Z;
@@

x = func(...);

if (
(
+	!
	x
-	== NULL
|
+	!
-	NULL ==
	x
)
   ) Z
Signed-off-by: default avatarEva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0540609f
......@@ -1121,7 +1121,7 @@ static ssize_t gb_camera_debugfs_write(struct file *file,
return -EINVAL;
kbuf = kmalloc(len + 1, GFP_KERNEL);
if (kbuf == NULL)
if (!kbuf)
return -ENOMEM;
if (copy_from_user(kbuf, buf, len)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment