• I
    mlx4: fix error path in drivers/net/mlx4/en_rx.c · b58515be
    Ingo Molnar 提交于
    this warning:
    
      drivers/net/mlx4/en_rx.c: In function ‘mlx4_en_activate_rx_rings’:
      drivers/net/mlx4/en_rx.c:412: warning: ‘err’ may be used uninitialized in this function
    
    Triggers because 'err' is uninitialized in the following input
    conditions: priv->rx_ring_num is zero and mlx4_en_fill_rx_buffers()
    fails.
    
    But even if ->rx_ring_num is nonzero, 'err' will be zero if
    mlx4_en_fill_rx_buffers() fails and mlx4_en_activate_rx_rings() returns
    success - incorrectly.
    
    So it's best to keep the error code uptodate on mlx4_en_fill_rx_buffers()
    calls as well.
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    b58515be
en_rx.c 29.8 KB