diff options
author | Jean Sacren <sakiwit@gmail.com> | 2014-05-01 14:31:18 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-17 16:23:18 -0700 |
commit | d38aa2e6b4ce857b06725b405db19938e594393f (patch) | |
tree | bd56ddc73c1c3419cbcea05d6be8f0c05161a7c1 /drivers/net | |
parent | ae2fbe4ff3f3368325629d884fe0d53f23d8f8be (diff) | |
download | lwn-d38aa2e6b4ce857b06725b405db19938e594393f.tar.gz lwn-d38aa2e6b4ce857b06725b405db19938e594393f.zip |
i40e: fix passing wrong error code to i40e_open()
commit ce9ccb17ef5b5088172f46dd246c92523fd3a524 upstream.
The commit 6c167f582ea9 ("i40e: Refactor and cleanup i40e_open(),
adding i40e_vsi_open()") introduced a new function i40e_vsi_open()
with the regression by a typo. Due to the commit, the wrong error
code would be passed to i40e_open(). Fix this error in
i40e_vsi_open() by turning the macro into a negative value so that
i40e_open() could return the pertinent error code correctly.
Fixes: 6c167f582ea9 ("i40e: Refactor and cleanup i40e_open(), adding i40e_vsi_open()")
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index cf0761f08911..71dfd79f391a 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -4310,7 +4310,7 @@ int i40e_vsi_open(struct i40e_vsi *vsi) goto err_setup_rx; if (!vsi->netdev) { - err = EINVAL; + err = -EINVAL; goto err_setup_rx; } snprintf(int_name, sizeof(int_name) - 1, "%s-%s", |