diff options
author | Olof Johansson <olof@lixom.net> | 2017-01-30 05:57:59 +0100 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2017-01-30 05:57:59 +0100 |
commit | 95f4e568eb1786e300353ffba7830c365ab78682 (patch) | |
tree | b80b526762f3f32f151b7255f9273abeffb8b544 /drivers | |
parent | Merge tag 'omap-for-v4.11/drivers-signed' of git://git.kernel.org/pub/scm/lin... (diff) | |
parent | memory: tegra: Add a missing 'of_node_put()' call (diff) | |
download | linux-95f4e568eb1786e300353ffba7830c365ab78682.tar.xz linux-95f4e568eb1786e300353ffba7830c365ab78682.zip |
Merge tag 'tegra-for-4.11-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers
memory: tegra: Changes for v4.11-rc1
This contains a single commit that plugs a potential device node leak in
error handling code.
* tag 'tegra-for-4.11-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
memory: tegra: Add a missing 'of_node_put()' call
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/memory/tegra/tegra124-emc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c index 06cc781ebac1..392dc8dd481f 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -1115,11 +1115,10 @@ static int tegra_emc_probe(struct platform_device *pdev) } mc = of_find_device_by_node(np); + of_node_put(np); if (!mc) return -ENOENT; - of_node_put(np); - emc->mc = platform_get_drvdata(mc); if (!emc->mc) return -EPROBE_DEFER; @@ -1135,9 +1134,7 @@ static int tegra_emc_probe(struct platform_device *pdev) } err = tegra_emc_load_timings_from_dt(emc, np); - of_node_put(np); - if (err) return err; |