lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a13b0e48-103d-8e3d-6d40-994cbdca9b44@collabora.com>
Date:   Fri, 8 Sep 2023 12:01:58 +0200
From:   AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
To:     ChiaEn Wu <chiaen_wu@...htek.com>,
        Dan Carpenter <dan.carpenter@...aro.org>
Cc:     Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>,
        Sebastian Reichel <sre@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org,
        kernel-janitors@...r.kernel.org, error27@...il.com
Subject: Re: [PATCH] power: supply: mt6370: Fix missing error code in
 mt6370_chg_toggle_cfo()

Il 08/09/23 04:19, ChiaEn Wu ha scritto:
> On Thu, Sep 07, 2023 at 02:08:17PM +0300, Dan Carpenter wrote:
> 
> [...]
> 
>>>> diff --git a/drivers/power/supply/mt6370-charger.c b/drivers/power/supply/mt6370-charger.c
>>>> index f27dae5043f5..a9641bd3d8cf 100644
>>>> --- a/drivers/power/supply/mt6370-charger.c
>>>> +++ b/drivers/power/supply/mt6370-charger.c
>>>> @@ -324,7 +324,7 @@ static int mt6370_chg_toggle_cfo(struct mt6370_priv *priv)
>>>>    	if (fl_strobe) {
>>>>    		dev_err(priv->dev, "Flash led is still in strobe mode\n");
>>>> -		return ret;
>>>> +		return -EINVAL;
>>>
>>> I think that returning 0 here was intentional, but I agree on a return ret
>>> here being both confusing and wrong.
>>
>> If it's a success path then probably we should remove the dev_err().
>>
> 
> Hi all,
> Sorry for the late reply!
> 
> I agree with the first half of Angelo's statement, I did make the
> mistake on this 'return ret'.
> What I was trying to say is that you should not to toggle cfo function
> when the FLED of MT6370 is still in "strobe mode".
> 
> Therefore, I think the change of Harshit's patch is correct.
> It should be 'return -EINVAL' or 'return -EPERM' here.
> 
> Thanks!
> 
> 
> Reviewed-by: ChiaEn Wu <chiaen_wu@...htek.com>
> 
> 
> Best regards,
> ChiaEn Wu

Cool. In that case:

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ