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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200921093914.GJ1840@ninjato>
Date:   Mon, 21 Sep 2020 11:39:14 +0200
From:   Wolfram Sang <wsa@...nel.org>
To:     trix@...hat.com
Cc:     syniurge@...il.com, nehal-bakulchandra.shah@....com,
        shyam-sundar.s-k@....com, natechancellor@...il.com,
        ndesaulniers@...gle.com, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH] i2c: amd_mp2: handle num is 0 input for i2c_amd_xfer

On Fri, Sep 04, 2020 at 11:06:47AM -0700, trix@...hat.com wrote:
> From: Tom Rix <trix@...hat.com>
> 
> clang static analyzer reports this problem
> 
> i2c-amd-mp2-plat.c:174:9: warning: Branch condition evaluates
>   to a garbage value
>         return err ? err : num;
>                ^~~
> 
> err is not initialized, it depends on the being set in the
> transfer loop which will not happen if num is 0.  Surveying
> other master_xfer() implementations show all handle a 0 num.
> 
> Because returning 0 is expected, initialize err to 0.
> 
> Signed-off-by: Tom Rix <trix@...hat.com>

Applied to for-next, thanks!


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ