can: dev: add missing of_node_put after calling of_get_child_by_name
Subsystems (3)
PATCH 1/1 can: dev: add missing of_node_put after calling of_get_child_by_name
of_node_put needs to be called when the device node which is got from of_get_child_by_name finished using.
Fixes 2290aefa2e90 ("can: dev: Add support for limiting configured bitrate")
Signed-off-by Wen Yang <[email protected]>
Cc Wolfgang Grandegger <[email protected]>
Cc Marc Kleine-Budde <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Franklin S Cooper Jr <[email protected]>
--- drivers/net/can/dev.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/can/dev.c +1 -0
@@ -848,6 +848,7 @@ void of_can_transceiver(struct net_device *dev)return ; ret =of_property_read_u32 (dn,"max-bitrate" , &priv->bitrate_max); +of_node_put (dn);if ((ret && ret != -EINVAL ) || (!ret && !priv->bitrate_max))netdev_warn (dev,"Invalid value for transceiver max bitrate. Ignoring bitrate limit.\n" ); }
Signature · 1 line
1.8.3.1
Quoted 12 lines · Wen Yang
of_node_putneeds to be called when the device node which is got fromof_get_child_by_namefinished using.Fixes 2290aefa2e90 ("can: dev: Add support for limiting configured bitrate")Signed-off-by Wen Yang <[email protected]>Cc Wolfgang Grandegger <[email protected]>Cc Marc Kleine-Budde <[email protected]>Cc "David S. Miller" <[email protected]>Cc Franklin S Cooper Jr <[email protected]>
Applied to linux-can.
Tnx,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |