Skip to contentSkip to conversation

can: mcba_usb: remove redundant initialization of variable err

PATCH New Colin King 1 participant 1 message Jul 6, 2020

Subsystems (5)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 can: mcba_usb: remove redundant initialization of variable err

From: Colin Ian King <[email protected]>

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")

---
 drivers/net/can/usb/mcba_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/usb/mcba_usb.c +1 -1
index 21faa2ec4632..37ab3de43acc 100644
@@ -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);
Signature · 1 line
2.27.0