summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/camera.c
diff options
context:
space:
mode:
authorEva Rachel Retuya <eraretuya@gmail.com>2016-09-21 12:59:29 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-22 11:54:47 +0200
commitce35e9be62837d8242472264b511f9c27992adfa (patch)
treebd562b6b619917ff1b3612d6c3185f0d48aadc92 /drivers/staging/greybus/camera.c
parent0540609fe217c3eed5804bcc095b0c41db5e63b0 (diff)
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>
Diffstat (limited to 'drivers/staging/greybus/camera.c')
-rw-r--r--drivers/staging/greybus/camera.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index 46d2e8a9e490..491bdd720c0c 100644
--- a/drivers/staging/greybus/camera.c
+++ b/drivers/staging/greybus/camera.c
@@ -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)) {