On Sat, 16 Sep 2017, Srishti Sharma wrote:
> Test for NULL as !x where functions that return NULL on failure
> are used. Done using the following semantic patch by coccinelle.
>
> @ is_null @
> expression E;
> statement S;
> @@
>
> E = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|
> us
Test for NULL as !x where functions that return NULL on failure
are used. Done using the following semantic patch by coccinelle.
@ is_null @
expression E;
statement S;
@@
E = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|
usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));
(
if(!E)
S
2 matches
Mail list logo