diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2018-06-07 15:10:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-06-07 16:54:39 -0400 |
commit | 2ac0e1524d9585f5261cebecca262da6cedc1d85 (patch) | |
tree | e37e93c8debb78b6e27f7550c23aa9af1c597d46 /kernel/umh.c | |
parent | eb55bbf865d9979098c6a7a17cbdb41237ece951 (diff) | |
download | linux-stable-2ac0e1524d9585f5261cebecca262da6cedc1d85.tar.gz linux-stable-2ac0e1524d9585f5261cebecca262da6cedc1d85.tar.bz2 linux-stable-2ac0e1524d9585f5261cebecca262da6cedc1d85.zip |
net: mscc: ocelot: Fix uninitialized error in ocelot_netdevice_event()
With gcc-4.1.2:
drivers/net/ethernet/mscc/ocelot.c: In function ‘ocelot_netdevice_event’:
drivers/net/ethernet/mscc/ocelot.c:1129: warning: ‘ret’ may be used uninitialized in this function
If the list iterated over by netdev_for_each_lower_dev() is empty, ret
is never initialized, and converted into a notifier return value.
Fix this by preinitializing ret to zero.
Fixes: a556c76adc052c97 ("net: mscc: Add initial Ocelot switch support")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/umh.c')
0 files changed, 0 insertions, 0 deletions