projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0540609
)
staging: greybus: camera: simplify NULL test
author
Eva Rachel Retuya
<
[email protected]
>
Wed, 21 Sep 2016 04:59:29 +0000
(12:59 +0800)
committer
Greg Kroah-Hartman
<
[email protected]
>
Thu, 22 Sep 2016 09:54:47 +0000
(11:54 +0200)
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]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/greybus/camera.c
patch
|
blob
|
history
diff --git
a/drivers/staging/greybus/camera.c
b/drivers/staging/greybus/camera.c
index 46d2e8a9e49067fd7bf650081e48787ccced3ee4..491bdd720c0c24a09879300b63599d978428ae39 100644
(file)
--- 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)) {