nfp: fix error return code in nfp_pci_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 23 Jan 2018 02:10:27 +0000 (02:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jan 2018 15:43:28 +0000 (10:43 -0500)
commite58decc9c51eb61697aba35ba8eda33f4b80552d
tree2add6845c39c34b4f77fe8412cec6d3bfa068e67
parente71494ae68d2cbade38bbc2935cd7ff96e2b9b04
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>
drivers/net/ethernet/netronome/nfp/nfp_main.c