• Arnd Bergmann's avatar
    qed: fix link config error handling · 92619210
    Arnd Bergmann authored
    gcc-8 notices that qed_mcp_get_transceiver_data() may fail to
    return a result to the caller:
    
    drivers/net/ethernet/qlogic/qed/qed_mcp.c: In function 'qed_mcp_trans_speed_mask':
    drivers/net/ethernet/qlogic/qed/qed_mcp.c:1955:2: error: 'transceiver_type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
    When an error is returned by qed_mcp_get_transceiver_data(), we
    should propagate that to the caller of qed_mcp_trans_speed_mask()
    rather than continuing with uninitialized data.
    
    Fixes: c56a8be7 ("qed: Add supported link and advertise link to display in ethtool.")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    92619210
qed_mcp.c 96.9 KB