From: Mikko Perttunen <cyndis@kapsi.fi>
To: Yang Yingliang <yangyingliang@huawei.com>,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org
Cc: krzysztof.kozlowski@canonical.com, mperttunen@nvidia.com
Subject: Re: [PATCH -next] memory: tegra186-emc: Fix error return code in tegra186_emc_probe()
Date: Mon, 27 Sep 2021 11:52:48 +0300 [thread overview]
Message-ID: <09e28d31-881f-acd0-33d0-565bdc9475ae@kapsi.fi> (raw)
In-Reply-To: <20210927075107.2882569-1-yangyingliang@huawei.com>
On 9/27/21 10:51 AM, Yang Yingliang wrote:
> Return the error code when command fails.
>
> Fixes: 13324edbe926 ("memory: tegra186-emc: Handle errors in BPMP response")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/memory/tegra/tegra186-emc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c
> index abc0c2eeaab7..16351840b187 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 = msg.rx.ret;
> dev_err(&pdev->dev, "EMC DVFS MRQ failed: %d (BPMP error code)\n", msg.rx.ret);
> goto put_bpmp;
> }
>
Good catch, but we shouldn't return msg.rx.ret since it is a BPMP error
code that doesn't necessarily map directly to a Linux error code. So we
should set err to something like -EINVAL instead. Please update, or if
you'd prefer, I can fix it.
Mikko
next prev parent reply other threads:[~2021-09-27 8:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-27 7:51 Yang Yingliang
2021-09-27 8:52 ` Mikko Perttunen [this message]
2021-09-28 0:59 ` Yang Yingliang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09e28d31-881f-acd0-33d0-565bdc9475ae@kapsi.fi \
--to=cyndis@kapsi.fi \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=yangyingliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®