浏览代码

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>
Colin Ian King 9 年之前
父节点
当前提交
1e9bbb9bc2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/can/softing/softing_cs.c

+ 1 - 1
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[] = {