Message ID | 20170111150238.19845-1-colin.king@canonical.com |
---|---|
State | Awaiting Upstream, archived |
Delegated to: | David Miller |
Headers | show |
On 01/11/2017 04:02 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.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@canonical.com> Thanks, applied to can-next. Marc
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[] = {