mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 22:36:54 +07: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: 94ae899b20
("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…
Reference in New Issue
Block a user