Commit d38aa2e6 authored by Jean Sacren's avatar Jean Sacren Committed by Greg Kroah-Hartman

i40e: fix passing wrong error code to i40e_open()

commit ce9ccb17 upstream.

The commit 6c167f58 ("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: 6c167f58 ("i40e: Refactor and cleanup i40e_open(), adding i40e_vsi_open()")
Signed-off-by: default avatarJean Sacren <sakiwit@gmail.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ae2fbe4f
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment