Tag: 28f5caa1679e18d4718f5ca6c6aaf95cbfc7afb5

Staging: rtl8723au: Clean up tests if NULL returned on failure

Author: Bhumika Goyal <bhumirks@gmail.com> Some functions like kmalloc/usb_alloc_urb returns Null as their return value on failure. !x is generally preferred over x==NULL or NULL==x. So make use of !x if the value returned on failure by these functions is NULL. Done using coccinelle: @@ expression e; statement S; @@ e = \(kmalloc\|devm_kzalloc\|kmalloc_array \|devm_ioremap\|usb_alloc_urb\|alloc_netdev\)(…); – if(e==NULL) …

Continue reading