diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-12-06 16:13:39 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-07 17:57:19 -0800 |
commit | bbef72c630b522a9ffbf62dae19b59c880da6ea1 (patch) | |
tree | 30f7857dc7f75f1712e10cfadc202b81c03d0ec2 /drivers/net | |
parent | f55628b3e7648198e9c072b52080c5dea8678adf (diff) | |
download | linux-bbef72c630b522a9ffbf62dae19b59c880da6ea1.tar.bz2 |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c index 90cd243070d7..828c177df03d 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c @@ -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; } |