mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
fsl/fman: Add a missing 'of_node_put()' call in an error handling path
If 'of_phy_find_device()' fails, we must undo the previous 'of_node_get()' call, as done the the following error handling code. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
336eac4347
commit
25850c31c8
1 changed files with 1 additions and 0 deletions
|
|
@ -821,6 +821,7 @@ static int mac_probe(struct platform_device *_of_dev)
|
|||
phy = of_phy_find_device(mac_dev->phy_node);
|
||||
if (!phy) {
|
||||
err = -EINVAL;
|
||||
of_node_put(mac_dev->phy_node);
|
||||
goto _return_of_get_parent;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue