提交 3a71eba6 编写于 作者: J Jinpeng Cui 提交者: Marc Kleine-Budde

can: sja1000: remove redundant variable ret

Return value directly from register_candev() instead of
getting value from redundant variable ret.
Reported-by: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: NJinpeng Cui <cui.jinpeng2@zte.com.cn>
Link: https://lore.kernel.org/all/20220831161835.306079-1-cui.jinpeng2@zte.com.cnSigned-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
上级 0838921b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册