Skip to contentSkip to conversation

net: af_can: remove useless parameter 'err' in 'can_rx_register()'

PATCH Applied Ye Bin 2 participants 2 messages Dec 8, 2022

Subsystems (4)
lore
Share & tools
lore

Ye Bin

author
#0 lore raw

PATCH 1/1 net: af_can: remove useless parameter 'err' in 'can_rx_register()'

From: Ye Bin <[email protected]>

Since commit bdfb5765e45b remove NULL-ptr checks from users of can_dev_rcv_lists_find(). 'err' parameter is useless, so remove it.

---
 net/can/af_can.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/can/af_can.c +1 -2
index 27dcdcc0b808..ec3f7e658295 100644
@@ -446,7 +446,6 @@ int can_rx_register(struct net *net, struct net_device *dev, canid_t can_id,
 	struct hlist_head *rcv_list;
 	struct can_dev_rcv_lists *dev_rcv_lists;
 	struct can_rcv_lists_stats *rcv_lists_stats = net->can.rcv_lists_stats;
-	int err = 0;
 
 	/* insert new receiver  (dev,canid,mask) -> (func,data) */
 
@@ -481,7 +480,7 @@ int can_rx_register(struct net *net, struct net_device *dev, canid_t can_id,
 					       rcv_lists_stats->rcv_entries);
 	spin_unlock_bh(&net->can.rcvlists_lock);
 
-	return err;
+	return 0;
 }
 EXPORT_SYMBOL(can_rx_register);
 
Signature · 1 line
2.31.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Ye Bin

From: Ye Bin <[email protected]>

Since commit bdfb5765e45b remove NULL-ptr checks from users of can_dev_rcv_lists_find(). 'err' parameter is useless, so remove it.

Applied to linux-can-next.

Thanks,
Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |