linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: Mikko Perttunen <cyndis@kapsi.fi>, <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: Tue, 28 Sep 2021 08:59:02 +0800	[thread overview]
Message-ID: <19c2733a-7393-8a65-e188-65c4d750eaa7@huawei.com> (raw)
In-Reply-To: <09e28d31-881f-acd0-33d0-565bdc9475ae@kapsi.fi>

Hi,

On 2021/9/27 16:52, Mikko Perttunen wrote:
> 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.
I can send a v2 later.
>
> Mikko
> .

      reply	other threads:[~2021-09-28  0:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  7:51 [PATCH -next] memory: tegra186-emc: Fix error return code in tegra186_emc_probe() Yang Yingliang
2021-09-27  8:52 ` Mikko Perttunen
2021-09-28  0:59   ` Yang Yingliang [this message]

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=19c2733a-7393-8a65-e188-65c4d750eaa7@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=cyndis@kapsi.fi \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.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;
as well as URLs for NNTP newsgroup(s).