2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00

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: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Eva Rachel Retuya 2016-09-21 12:59:29 +08:00 committed by Greg Kroah-Hartman
parent 0540609fe2
commit ce35e9be62

View File

@ -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)) {