• Arnd Bergmann's avatar
    rocker: fix maybe-uninitialized warning · ecf244f7
    Arnd Bergmann authored
    In some rare configurations, we get a warning about the 'index' variable
    being used without an initialization:
    
    drivers/net/ethernet/rocker/rocker_ofdpa.c: In function ‘ofdpa_port_fib_ipv4.isra.16.constprop’:
    drivers/net/ethernet/rocker/rocker_ofdpa.c:2425:92: warning: ‘index’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    This is a false positive, the logic is just a bit too complex for gcc
    to follow here. Moving the intialization of 'index' a little further
    down makes it clear to gcc that the function always returns an error
    if it is not initialized.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ecf244f7
rocker_ofdpa.c 81.6 KB