Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1524582 > unrolled thread
| Started by | Johan Hovold <johan@kernel.org> |
|---|---|
| First post | 2016-11-17 18:40 +0100 |
| Last post | 2016-11-17 18:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH net v2 2/7] net: ethernet: ti: cpsw: fix mdio device reference leak Johan Hovold <johan@kernel.org> - 2016-11-17 18:40 +0100
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Date | 2016-11-17 18:40 +0100 |
| Subject | [PATCH net v2 2/7] net: ethernet: ti: cpsw: fix mdio device reference leak |
| Message-ID | <sEyPg-3IB-31@gated-at.bofh.it> |
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: 549985ee9c72 ("cpsw: simplify the setup of the register
pointers")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/ti/cpsw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index f60f8ab7c1e3..84c5d214557e 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -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",
--
2.7.3
Back to top | Article view | linux.kernel
csiph-web