diff options
author | Jinpeng Cui <cui.jinpeng2@zte.com.cn> | 2022-08-31 16:18:35 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-09-05 22:00:43 +0200 |
commit | 3a71eba64c9cb30d457bf1b0fa32f1c34a841e07 (patch) | |
tree | 024c67fef7d5785fab168eec8af6a2f93afa7852 /drivers/net/can/sja1000 | |
parent | 0838921bb4094ca3c88f3cc01a700f35da2bed96 (diff) |
can: sja1000: remove redundant variable ret
Return value directly from register_candev() instead of
getting value from redundant variable ret.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Link: https://lore.kernel.org/all/20220831161835.306079-1-cui.jinpeng2@zte.com.cn
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/sja1000')
-rw-r--r-- | drivers/net/can/sja1000/sja1000.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 98dfd5f295a7..1bb1129b0450 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c @@ -661,8 +661,6 @@ static const struct ethtool_ops sja1000_ethtool_ops = { int register_sja1000dev(struct net_device *dev) { - int ret; - if (!sja1000_probe_chip(dev)) return -ENODEV; @@ -673,9 +671,7 @@ int register_sja1000dev(struct net_device *dev) set_reset_mode(dev); chipset_init(dev); - ret = register_candev(dev); - - return ret; + return register_candev(dev); } EXPORT_SYMBOL_GPL(register_sja1000dev); |