Message ID | 86154518-3338-4370-8fa2-80a8b0e10302@web.de |
---|---|
State | New |
Headers | show |
Series | phy: tegra: xusb: Call of_node_put(np) only once in tegra_xusb_padctl_get() | expand |
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c index cfdb54b6070a..1a912ed52416 100644 --- a/drivers/phy/tegra/xusb.c +++ b/drivers/phy/tegra/xusb.c @@ -1345,12 +1345,9 @@ struct tegra_xusb_padctl *tegra_xusb_padctl_get(struct device *dev) * only ever be one per SoC that would be a little overkill. */ pdev = of_find_device_by_node(np); - if (!pdev) { - of_node_put(np); - return ERR_PTR(-ENODEV); - } - of_node_put(np); + if (!pdev) + return ERR_PTR(-ENODEV); padctl = platform_get_drvdata(pdev); if (!padctl) {