drivers: net: xgene: Simplify xgene_enet_setup_mss() to kill warning
authorGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 24 Feb 2017 10:30:03 +0000 (11:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Feb 2017 19:29:09 +0000 (14:29 -0500)
commit1b8c1012142d83229b7d1c960d131e6a30f777a6
tree87b0debde646e0ea29a320e911293d1f9cb7afac
parent3b5923f0796b13e731802d40faf62d2c59d98e48
drivers: net: xgene: Simplify xgene_enet_setup_mss() to kill warning

With gcc-4.1.2 and -Os:

    drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ‘xgene_enet_start_xmit’:
    drivers/net/ethernet/apm/xgene/xgene_enet_main.c:297: warning: ‘mss_index’ may be used uninitialized in this function

Using a separate variable to track success may confuse the compiler.
Preinitialize mss_index with -EBUSY and check for negative error values
instead to kill the warning.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/apm/xgene/xgene_enet_main.c