projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0838921
)
can: sja1000: remove redundant variable ret
author
Jinpeng Cui
<cui.jinpeng2@zte.com.cn>
Wed, 31 Aug 2022 16:18:35 +0000
(16:18 +0000)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Mon, 5 Sep 2022 20:00:43 +0000
(22:00 +0200)
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>
drivers/net/can/sja1000/sja1000.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/sja1000/sja1000.c
b/drivers/net/can/sja1000/sja1000.c
index
98dfd5f
..
1bb1129
100644
(file)
--- 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);