net/mlx5: fix return value of start operation
authorOlivier Matz <olivier.matz@6wind.com>
Mon, 22 Jan 2018 12:33:37 +0000 (13:33 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 29 Jan 2018 09:04:28 +0000 (10:04 +0100)
On error, mlx5_dev_start() does not return a negative value
as it is supposed to do. The consequence is that the application
(ex: testpmd) does not notice that the port is not started
and begins the rxtx on an uninitialized port, which crashes.

Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_trigger.c

index 61fa260..827db2e 100644 (file)
@@ -181,7 +181,7 @@ error:
        priv_rxq_stop(priv);
        priv_flow_delete_drop_queue(priv);
        priv_unlock(priv);
-       return -err;
+       return err;
 }
 
 /**