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:
parent
0540609fe2
commit
ce35e9be62
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user