summaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2017-01-29 20:57:59 -0800
committerOlof Johansson <olof@lixom.net>2017-01-29 20:57:59 -0800
commit95f4e568eb1786e300353ffba7830c365ab78682 (patch)
treeb80b526762f3f32f151b7255f9273abeffb8b544 /drivers/memory
parent874767e52cec4f5726ce11339b12cc08386cf88e (diff)
parentb92f4380a1c7eb3ed19d6f68ad7b66c66d8102b4 (diff)
downloadlinux-95f4e568eb1786e300353ffba7830c365ab78682.tar.bz2
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/memory')
-rw-r--r--drivers/memory/tegra/tegra124-emc.c5
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;