gcc-9: don't warn about uninitialized variable 92/221392/1
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 May 2019 18:07:40 +0000 (11:07 -0700)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 31 Dec 2019 04:50:58 +0000 (13:50 +0900)
commitb1c8a207739cd48001726943b10b9ac21d05dcb8
tree6adad126de743926a0b7c67dd908ba10053dc6ad
parentfd1078519e04e5c3cc40c08287c7d98b95908a05
gcc-9: don't warn about uninitialized variable

commit cf676908846a06443fa5e6724ca3f5dd7460eca1 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[sw0312.kim: cherry-pick from stable linux-4.19.y commit a152a7b411a5 for gcc 9 build]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I9ffd18114904d32ebb631680c7ac40d9771771c2
drivers/i2c/i2c-core-base.c