summaryrefslogtreecommitdiff
path: root/drivers/memory
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2019-11-15 19:26:42 +0300
committerThierry Reding <treding@nvidia.com>2019-11-18 13:54:40 +0100
commit030d2829f4c22e675e21904f32ab60f659174e72 (patch)
tree9df50dc1c5779f2eabd09b5eac8dedb23ed01a0f /drivers/memory
parent141bef44e123c101c0da0443ab6b3cfa750f251a (diff)
downloadlwn-030d2829f4c22e675e21904f32ab60f659174e72.tar.gz
lwn-030d2829f4c22e675e21904f32ab60f659174e72.zip
memory: tegra30-emc: Fix panic on suspend
Trying to suspend driver results in a crash if timings aren't available in device-tree. Reported-by: Jon Hunter <jonathanh@nvidia.com> Fixes: e34212c75a68 ("memory: tegra: Introduce Tegra30 EMC driver") Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/tegra/tegra30-emc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/memory/tegra/tegra30-emc.c b/drivers/memory/tegra/tegra30-emc.c
index 6929980bf907..0b6a5e451ea3 100644
--- a/drivers/memory/tegra/tegra30-emc.c
+++ b/drivers/memory/tegra/tegra30-emc.c
@@ -1093,7 +1093,7 @@ static int tegra_emc_probe(struct platform_device *pdev)
if (of_get_child_count(pdev->dev.of_node) == 0) {
dev_info(&pdev->dev,
"device-tree node doesn't have memory timings\n");
- return 0;
+ return -ENODEV;
}
np = of_parse_phandle(pdev->dev.of_node, "nvidia,memory-controller", 0);