diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-01-23 02:10:27 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-23 10:43:28 -0500 |
commit | e58decc9c51eb61697aba35ba8eda33f4b80552d (patch) | |
tree | 2add6845c39c34b4f77fe8412cec6d3bfa068e67 /drivers | |
parent | e71494ae68d2cbade38bbc2935cd7ff96e2b9b04 (diff) | |
download | lwn-e58decc9c51eb61697aba35ba8eda33f4b80552d.tar.gz lwn-e58decc9c51eb61697aba35ba8eda33f4b80552d.zip |
nfp: fix error return code in nfp_pci_probe()
Fix to return error code -EINVAL instead of 0 when num_vfs above
limit_vfs, as done elsewhere in this function.
Fixes: 0dc786219186 ("nfp: handle SR-IOV already enabled when driver is probing")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c index c5b91040b12e..cc570bb6563c 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_main.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c @@ -518,6 +518,7 @@ static int nfp_pci_probe(struct pci_dev *pdev, dev_err(&pdev->dev, "Error: %d VFs already enabled, but loaded FW can only support %d\n", pf->num_vfs, pf->limit_vfs); + err = -EINVAL; goto err_fw_unload; } |