Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gcc-9: don't warn about uninitialized variable

I'm not sure what made gcc warn about this code now. The 'ret' variable
does end up initialized in all cases, but it's definitely not obvious,
so the compiler is quite reasonable to warn about this.

So just add initialization to make it all much more obvious both to
compilers and to humans.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+1 -1
+1 -1
drivers/i2c/i2c-core-base.c
··· 185 185 int i2c_generic_scl_recovery(struct i2c_adapter *adap) 186 186 { 187 187 struct i2c_bus_recovery_info *bri = adap->bus_recovery_info; 188 - int i = 0, scl = 1, ret; 188 + int i = 0, scl = 1, ret = 0; 189 189 190 190 if (bri->prepare_recovery) 191 191 bri->prepare_recovery(adap);