Skip to content
Snippets Groups Projects
Commit bbef72c6 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Jakub Kicinski
Browse files

dpaa2-mac: Add a missing of_node_put after of_device_is_available


Add an 'of_node_put()' call when a tested device node is not available.

Fixes: 94ae899b ("dpaa2-mac: add PCS support through the Lynx module")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20201206151339.44306-1-christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f55628b3
No related branches found
No related tags found
No related merge requests found
...@@ -269,6 +269,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac, ...@@ -269,6 +269,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
if (!of_device_is_available(node)) { if (!of_device_is_available(node)) {
netdev_err(mac->net_dev, "pcs-handle node not available\n"); netdev_err(mac->net_dev, "pcs-handle node not available\n");
of_node_put(node);
return -ENODEV; return -ENODEV;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment