mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 23:00:21 +00:00
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: 94ae899b2096 ("dpaa2-mac: add PCS support through the Lynx module") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/20201206151339.44306-1-christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f55628b3e7
commit
bbef72c630
@ -269,6 +269,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
|
||||
|
||||
if (!of_device_is_available(node)) {
|
||||
netdev_err(mac->net_dev, "pcs-handle node not available\n");
|
||||
of_node_put(node);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user