Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <colin.king@canonical.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Colin Ian King and committed by
Marc Kleine-Budde
1e9bbb9b 431af779

+1 -1
+1 -1
drivers/net/can/softing/softing_cs.c
··· 310 310 pcmcia_failed: 311 311 pcmcia_disable_device(pcmcia); 312 312 pcmcia->priv = NULL; 313 - return ret ?: -ENODEV; 313 + return ret; 314 314 } 315 315 316 316 static const struct pcmcia_device_id softingcs_ids[] = {