Skip to content

Commit bbef72c

Browse files
tititiou36kuba-moo
authored andcommitted
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: 94ae899 ("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>
1 parent f55628b commit bbef72c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ static int dpaa2_pcs_create(struct dpaa2_mac *mac,
269269

270270
if (!of_device_is_available(node)) {
271271
netdev_err(mac->net_dev, "pcs-handle node not available\n");
272+
of_node_put(node);
272273
return -ENODEV;
273274
}
274275

0 commit comments

Comments
 (0)