forked from Minki/linux
net: ethernet: ti: cpsw: fix mdio device reference leak
Make sure to drop the reference taken by of_find_device_by_node() when
looking up an mdio device from a phy_id property during probe.
Fixes: 549985ee9c
("cpsw: simplify the setup of the register
pointers")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c46ab7e08c
commit
86e1d5adce
@ -2397,6 +2397,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
|
||||
}
|
||||
snprintf(slave_data->phy_id, sizeof(slave_data->phy_id),
|
||||
PHY_ID_FMT, mdio->name, phyid);
|
||||
put_device(&mdio->dev);
|
||||
} else {
|
||||
dev_err(&pdev->dev,
|
||||
"No slave[%d] phy_id, phy-handle, or fixed-link property\n",
|
||||
|
Loading…
Reference in New Issue
Block a user