mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 02:05:33 +00:00
net: cpsw: add missing of_node_put
Add missing of_node_put to avoid kref leak. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6954cc1f23
commit
60e71ab56b
@ -1871,6 +1871,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
|
|||||||
mdio_node = of_find_node_by_phandle(be32_to_cpup(parp));
|
mdio_node = of_find_node_by_phandle(be32_to_cpup(parp));
|
||||||
phyid = be32_to_cpup(parp+1);
|
phyid = be32_to_cpup(parp+1);
|
||||||
mdio = of_find_device_by_node(mdio_node);
|
mdio = of_find_device_by_node(mdio_node);
|
||||||
|
of_node_put(mdio_node);
|
||||||
if (!mdio) {
|
if (!mdio) {
|
||||||
pr_err("Missing mdio platform device\n");
|
pr_err("Missing mdio platform device\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user