]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
can: softing_cs: ret is never non-zero, so remove non-zero check and -ENODEV return
authorColin Ian King <colin.king@canonical.com>
Wed, 11 Jan 2017 15:02:38 +0000 (15:02 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 24 Jan 2017 12:52:00 +0000 (13:52 +0100)
The error return ret is never zero in the error handling path in
softingcs_probe, so the check for non-zero and returning -ENODEV
is logically dead code and hence redundant.  Remove it and just
return ret.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/softing/softing_cs.c

index cdc0c7433a4b534255b01cdbafa43c0cca831aac..4d4492884e0b003cc5c8c0a1067f7c1a5acc85a3 100644 (file)
@@ -310,7 +310,7 @@ pcmcia_bad:
 pcmcia_failed:
        pcmcia_disable_device(pcmcia);
        pcmcia->priv = NULL;
-       return ret ?: -ENODEV;
+       return ret;
 }
 
 static const struct pcmcia_device_id softingcs_ids[] = {