Skip to content

Commit 521405c

Browse files
Erickkaranjakuba-moo
authored andcommitted
net: fsl_pq_mdio: Fix device node reference leak in fsl_pq_mdio_probe
Add missing of_node_put call to release device node tbi obtained via for_each_child_of_node. Fixes: afae5ad ("net/fsl_pq_mdio: streamline probing of MDIO nodes") Signed-off-by: Erick Karanja <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2db687f commit 521405c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/net/ethernet/freescale/fsl_pq_mdio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,12 @@ static int fsl_pq_mdio_probe(struct platform_device *pdev)
479479
"missing 'reg' property in node %pOF\n",
480480
tbi);
481481
err = -EBUSY;
482+
of_node_put(tbi);
482483
goto error;
483484
}
484485
set_tbipa(*prop, pdev,
485486
data->get_tbipa, priv->map, &res);
487+
of_node_put(tbi);
486488
}
487489
}
488490

0 commit comments

Comments
 (0)