staging: greybus: camera: simplify NULL test
PATCH 1/1 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 <[email protected]>
--- drivers/staging/greybus/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/greybus/camera.c +1 -1
@@ -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)) {
Signature · 1 line
2.7.4