archive mirror
 help / color / mirror / Atom feed
* [PATCH] can: mcba_usb: remove redundant initialization of variable err
@ 2020-07-06 16:42 Colin King
  0 siblings, 0 replies; only message in thread
From: Colin King @ 2020-07-06 16:42 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, David S . Miller,
	Jakub Kicinski, linux-can, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <>

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 <>
 drivers/net/can/usb/mcba_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c
index 21faa2ec4632..37ab3de43acc 100644
--- a/drivers/net/can/usb/mcba_usb.c
+++ b/drivers/net/can/usb/mcba_usb.c
@@ -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);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-06 16:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 16:42 [PATCH] can: mcba_usb: remove redundant initialization of variable err Colin King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).