[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170111150238.19845-1-colin.king@canonical.com>
Date: Wed, 11 Jan 2017 15:02:38 +0000
From: Colin King <colin.king@...onical.com>
To: Wolfgang Grandegger <wg@...ndegger.com>,
Marc Kleine-Budde <mkl@...gutronix.de>,
linux-can@...r.kernel.org, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] softingcs: ret is never non-zero, so remove non-zero check and -ENODEV return
From: Colin Ian King <colin.king@...onical.com>
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@...onical.com>
---
drivers/net/can/softing/softing_cs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/softing/softing_cs.c b/drivers/net/can/softing/softing_cs.c
index cdc0c74..4d44928 100644
--- a/drivers/net/can/softing/softing_cs.c
+++ b/drivers/net/can/softing/softing_cs.c
@@ -310,7 +310,7 @@ static int softingcs_probe(struct pcmcia_device *pcmcia)
pcmcia_failed:
pcmcia_disable_device(pcmcia);
pcmcia->priv = NULL;
- return ret ?: -ENODEV;
+ return ret;
}
static const struct pcmcia_device_id softingcs_ids[] = {
--
2.10.2
Powered by blists - more mailing lists