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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ccd8a02d-13a0-432a-ecd0-94234a2cfd83@st.com>
Date:   Mon, 5 Nov 2018 15:24:09 +0100
From:   Arnaud Pouliquen <arnaud.pouliquen@...com>
To:     David Binderman <dcb314@...mail.com>,
        Olivier MOYSAN <olivier.moysan@...com>,
        "lgirdwood@...il.com" <lgirdwood@...il.com>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "perex@...ex.cz" <perex@...ex.cz>,
        "tiwai@...e.com" <tiwai@...e.com>,
        "mcoquelin.stm32@...il.com" <mcoquelin.stm32@...il.com>,
        Alexandre TORGUE <alexandre.torgue@...com>,
        "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
        "linux-stm32@...md-mailman.stormreply.com" 
        <linux-stm32@...md-mailman.stormreply.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: linux-4.20-rc1/sound/soc/stm/stm32_sai_sub.c:343: Faulty error
 check

Hello David,

On 11/5/18 2:33 PM, David Binderman wrote:
> Hello there,
> 
> linux-4.20-rc1/sound/soc/stm/stm32_sai_sub.c:343]: (style) Checking if
> unsigned variable 'div' is less than zero.
> 
> Source code is
> 
>         div = stm32_sai_get_clk_div(sai, parent_rate, rate);
>         if (div < 0)
>                 return div;
> 
> Suggest store return value from function in int local variable, test it
> and only then assign it into an unsigned variable.
> 
> Regards
> 
> David Binderman

Thanks for your feedback, a patch has already been sent and applied to
fix this warning: https://lkml.org/lkml/2018/11/5/510.

Regards,
Arnaud

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ