i40e: fix passing wrong error code to i40e_open()
authorJean Sacren <sakiwit@gmail.com>
Thu, 1 May 2014 14:31:18 +0000 (14:31 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 21 May 2014 11:22:37 +0000 (04:22 -0700)
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>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 0b34e8b31cbdd64c8f7eff7d7f5cfe3cee336df2..e0e5c6a867b196e2ad4852c820c9b6147e0faf9c 100644 (file)
@@ -4333,7 +4333,7 @@ int i40e_vsi_open(struct i40e_vsi *vsi)
                         dev_driver_string(&pf->pdev->dev));
                err = i40e_vsi_request_irq(vsi, int_name);
        } else {
-               err = EINVAL;
+               err = -EINVAL;
                goto err_setup_rx;
        }