summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-09-28 05:15:45 +0300
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-10-07 21:32:33 +0300
commit982ca19a09ac0365ad1409f919da43596d2a2276 (patch)
tree69c6d58319491ea7946e9e1e4d4afe28a318cfd0
parent1d8e0223bb52071ffc59391f0ebefa06ce5643d7 (diff)
downloadlinux-982ca19a09ac0365ad1409f919da43596d2a2276.tar.xz
memory: tegra186-emc: Fix error return code in tegra186_emc_probe()
Return the error code when command fails. Fixes: 13324edbe926 ("memory: tegra186-emc: Handle errors in BPMP response") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> Link: https://lore.kernel.org/r/20210928021545.3774677-1-yangyingliang@huawei.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
-rw-r--r--drivers/memory/tegra/tegra186-emc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c
index abc0c2eeaab7..746c4ef2c0af 100644
--- a/drivers/memory/tegra/tegra186-emc.c
+++ b/drivers/memory/tegra/tegra186-emc.c
@@ -198,6 +198,7 @@ static int tegra186_emc_probe(struct platform_device *pdev)
goto put_bpmp;
}
if (msg.rx.ret < 0) {
+ err = -EINVAL;
dev_err(&pdev->dev, "EMC DVFS MRQ failed: %d (BPMP error code)\n", msg.rx.ret);
goto put_bpmp;
}