[media] staging: lirc_zilog: Clean up tests if NULL returned on failure
authorsimran singhal <singhalsimran0@gmail.com>
Fri, 10 Mar 2017 05:13:12 +0000 (02:13 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 17 Apr 2017 19:58:11 +0000 (16:58 -0300)
commita1aae088e7f9dbd97164bbacc2b624d9bacd98a3
tree2a05ddf3e766a5a21df5fdd3bea6064bcdae3893
parent6eb1951d53a3eeb8cefa101b8022f5f6572f9d5d
[media] staging: lirc_zilog: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/lirc/lirc_zilog.c