Re: [PATCH] i2c: amd_mp2: handle num is 0 input for i2c_amd_xfer

2020-09-21 Thread Wolfram Sang
On Fri, Sep 04, 2020 at 11:06:47AM -0700, t...@redhat.com wrote: > From: Tom Rix > > 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 initiali

Re: [PATCH] i2c: amd_mp2: handle num is 0 input for i2c_amd_xfer

2020-09-07 Thread Wolfram Sang
On Fri, Sep 04, 2020 at 11:06:47AM -0700, t...@redhat.com wrote: > From: Tom Rix > > 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 initiali

Re: [PATCH] i2c: amd_mp2: handle num is 0 input for i2c_amd_xfer

2020-09-05 Thread Elie Morisse
Acked-by: Elie Morisse Le ven. 4 sept. 2020 à 20:06, a écrit : > > From: Tom Rix > > 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 initiali

[PATCH] i2c: amd_mp2: handle num is 0 input for i2c_amd_xfer

2020-09-04 Thread trix
From: Tom Rix 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