commit | 3956c8ac3999e0a5e36bdf0586f811db5ef28594 | [log] [tgz] |
---|---|---|
author | simran singhal <singhalsimran0@gmail.com> | Sat Mar 04 22:16:53 2017 +0530 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Thu Mar 09 18:19:07 2017 +0100 |
tree | 64eb81e7636fe48c518437b22c84675ba36cb31e | |
parent | c946c698bc0d8b66570180d046c57177545c0f6e [diff] |
staging: rtl8192u: 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> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>