net: tg3: avoid uninitialized variable warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 29 Jan 2016 11:39:15 +0000 (12:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 May 2017 05:46:01 +0000 (07:46 +0200)
commitec2170f98f9a218c62b9d49163dbbd0d8897a2a4
tree39ac8e366a64ac22f0d1626a40f3be821b022a16
parentfd79e436325841863d070f8e72246b437c0f5a15
net: tg3: avoid uninitialized variable warning

commit e434e04110704eb91acfecbd0fb8ca8e2da9c29b upstream.

The tg3_set_eeprom() function correctly initializes the 'start' variable,
but gcc generates a false warning:

drivers/net/ethernet/broadcom/tg3.c: In function 'tg3_set_eeprom':
drivers/net/ethernet/broadcom/tg3.c:12057:4: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized]

I have not come up with a way to restructure the code in a way that
avoids the warning without making it less readable, so this adds an
initialization for the declaration to shut up that warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/tg3.c