Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for
consistency. Coccinelle semantic patch used:
@@
identifier func;
expression x;
statement Z;
@@
x = func(...);
if (
(
+ !
x
- == NULL
|
+ !
- NULL ==
x
)
) Z
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
int result;
skb = dev_alloc_skb(sizeof(hfa384x_usbin_t));
- if (skb == NULL) {
+ if (!skb) {
result = -ENOMEM;
goto done;
}
hfa384x_usbctlx_t *ctlx;
ctlx = usbctlx_alloc();
- if (ctlx == NULL) {
+ if (!ctlx) {
result = -ENOMEM;
goto done;
}
hfa384x_usbctlx_t *ctlx;
ctlx = usbctlx_alloc();
- if (ctlx == NULL) {
+ if (!ctlx) {
result = -ENOMEM;
goto done;
}
hfa384x_usbctlx_t *ctlx;
ctlx = usbctlx_alloc();
- if (ctlx == NULL) {
+ if (!ctlx) {
result = -ENOMEM;
goto done;
}
hfa384x_usbctlx_t *ctlx;
ctlx = usbctlx_alloc();
- if (ctlx == NULL) {
+ if (!ctlx) {
result = -ENOMEM;
goto done;
}
pr_debug("page=0x%04x offset=0x%04x len=%d\n", page, offset, len);
ctlx = usbctlx_alloc();
- if (ctlx == NULL) {
+ if (!ctlx) {
result = -ENOMEM;
goto done;
}
}
skb = dev_alloc_skb(skblen);
- if (skb == NULL)
+ if (!skb)
return;
/* only prepend the prism header if in the right mode */
/* Allocate buffer space for chunks */
for (i = 0; i < *ccnt; i++) {
clist[i].data = kzalloc(clist[i].len, GFP_KERNEL);
- if (clist[i].data == NULL) {
+ if (!clist[i].data) {
pr_err("failed to allocate image space, exitting.\n");
return 1;
}
dev = interface_to_usbdev(interface);
wlandev = create_wlan();
- if (wlandev == NULL) {
+ if (!wlandev) {
dev_err(&interface->dev, "Memory allocation failure.\n");
result = -EIO;
goto failed;