1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/mscc
Geert Uytterhoeven 2ac0e1524d 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: a556c76adc ("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>
2018-06-07 16:54:39 -04:00
..
Kconfig net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
Makefile net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot.c net: mscc: ocelot: Fix uninitialized error in ocelot_netdevice_event() 2018-06-07 16:54:39 -04:00
ocelot.h net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_ana.h net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_board.c net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_dev.h net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_dev_gmii.h net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_hsio.h net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_io.c net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_qs.h net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_qsys.h net: mscc: Add SPDX identifier 2018-05-18 11:30:25 -04:00
ocelot_regs.c net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_rew.h net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00
ocelot_sys.h net: mscc: Add initial Ocelot switch support 2018-05-15 16:41:15 -04:00