summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2021-03-22 16:53:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-23 13:27:13 +0100
commitf8255ee192e92fdb885a9ff6bc90d74f5bfb7cd6 (patch)
tree61cc59f88a681289a68c1bbbbf6da7c32e5c3f17 /drivers/usb/class
parent4cde059acd11e79b205525e5fd66175d8576ec88 (diff)
downloadlinux-stable-f8255ee192e92fdb885a9ff6bc90d74f5bfb7cd6.tar.gz
linux-stable-f8255ee192e92fdb885a9ff6bc90d74f5bfb7cd6.tar.bz2
linux-stable-f8255ee192e92fdb885a9ff6bc90d74f5bfb7cd6.zip
USB: cdc-acm: use negation for NULL checks
Use negation consistently throughout the driver for NULL checks. Acked-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20210322155318.9837-7-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-acm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 4844f50e54de..1f0fcabef5d2 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1336,7 +1336,7 @@ made_compressed_probe:
dev_dbg(&intf->dev, "interfaces are valid\n");
acm = kzalloc(sizeof(struct acm), GFP_KERNEL);
- if (acm == NULL)
+ if (!acm)
return -ENOMEM;
tty_port_init(&acm->port);
@@ -1429,7 +1429,7 @@ made_compressed_probe:
struct acm_wb *snd = &(acm->wb[i]);
snd->urb = usb_alloc_urb(0, GFP_KERNEL);
- if (snd->urb == NULL)
+ if (!snd->urb)
goto err_free_write_urbs;
if (usb_endpoint_xfer_int(epwrite))