From 1e9bbb9bc2aa549d31fa0a0496ec33df0b3ae7a8 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 11 Jan 2017 15:02:38 +0000 Subject: [PATCH] can: softing_cs: ret is never non-zero, so remove non-zero check and -ENODEV return 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 Signed-off-by: Marc Kleine-Budde --- 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 cdc0c7433a4b..4d4492884e0b 100644 --- a/drivers/net/can/softing/softing_cs.c +++ b/drivers/net/can/softing/softing_cs.c @@ -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[] = {