mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-10 14:43:54 +08:00
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>
This commit is contained in:
parent
4cde059acd
commit
f8255ee192
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user