]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
can: mcba_usb: remove redundant initialization of variable err
authorColin Ian King <colin.king@canonical.com>
Mon, 6 Jul 2020 16:42:40 +0000 (17:42 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 21 Sep 2020 08:13:17 +0000 (10:13 +0200)
The variable err is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200706164240.518623-1-colin.king@canonical.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/mcba_usb.c

index eb6fb7435061fcf378c420aed499df49df52cbb1..5857b37dcd964d52acb861ba261dc9bdb01345ed 100644 (file)
@@ -793,7 +793,7 @@ static int mcba_usb_probe(struct usb_interface *intf,
 {
        struct net_device *netdev;
        struct mcba_priv *priv;
-       int err = -ENOMEM;
+       int err;
        struct usb_device *usbdev = interface_to_usbdev(intf);
 
        netdev = alloc_candev(sizeof(struct mcba_priv), MCBA_MAX_TX_URBS);