Staging: media: Use !x in place of NULL comparision
Test for NULL as !x instead of NULL comparisions for functions that return NULL on failure. Issue found using coccinelle Semantic patch used to solve the problem is as follows // <smpl> @@ expression x; statement S; @@ x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...)); -if(x==NULL) +if(!x) // </smpl> Signed-off-by:Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please sign in to comment