Commit f8255ee1 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: cdc-acm: use negation for NULL checks



Use negation consistently throughout the driver for NULL checks.

Acked-by: default avatarOliver Neukum <oneukum@suse.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210322155318.9837-7-johan@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4cde059a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1336,7 +1336,7 @@ static int acm_probe(struct usb_interface *intf,
	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 @@ static int acm_probe(struct usb_interface *intf,
		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))