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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Apr 2018 09:02:10 +0000 (11:02 +0200)
commitf2e73df302f31b588086b6eb5a4151b196faf427
tree12111afdb15675d012eb0cded1729281b689dc62
parent8591958413bfeacbe294dbb846e53c7bbd82e685
nfp: fix error return code in nfp_pci_probe()

[ Upstream commit e58decc9c51eb61697aba35ba8eda33f4b80552d ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/netronome/nfp/nfp_main.c