memory: tegra186-emc: Fix error return code in tegra186_emc_probe()

Return the error code when command fails.

Fixes: 13324edbe9 ("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>
This commit is contained in:
Yang Yingliang 2021-09-28 10:15:45 +08:00 committed by Krzysztof Kozlowski
parent 1d8e0223bb
commit 982ca19a09
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}