Skip to content

Commit

Permalink
can: softing_cs: ret is never non-zero, so remove non-zero check and …
Browse files Browse the repository at this point in the history
…-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 <colin.king@canonical.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Colin Ian King authored and Marc Kleine-Budde committed Jan 24, 2017
1 parent 431af77 commit 1e9bbb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/softing/softing_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down

0 comments on commit 1e9bbb9

Please sign in to comment.