]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
staging: rtl8192e: Standardize test for NULL.
The test for NULL of the return variable of functions was changed from
(ret == NULL) to !ret to match the standard.
Coccinelle was used with semantic patch:
@@
expression e;
identifier id, f;
statement S;
@@
f(...) { <+...
id =
\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap
\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\) (...)
... when any
when != id = e
+ if (!id)
- if (\(NULL == id\|id == NULL\))
S
...+> }
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>