Skip to content

Commit

Permalink
memory: tegra30-emc: Fix panic on suspend
Browse files Browse the repository at this point in the history
Trying to suspend driver results in a crash if timings aren't available in
device-tree.

Reported-by: Jon Hunter <jonathanh@nvidia.com>
Fixes: e34212c ("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>
  • Loading branch information
Dmitry Osipenko authored and Thierry Reding committed Nov 18, 2019
1 parent 141bef4 commit 030d282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/memory/tegra/tegra30-emc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 030d282

Please sign in to comment.