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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user