netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] nfp: fix error return code in nfp_pci_probe()
@ 2018-01-23  2:10 Wei Yongjun
  2018-01-23  2:33 ` Jakub Kicinski
  2018-01-23 15:43 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2018-01-23  2:10 UTC (permalink / raw)
  To: Jakub Kicinski, Simon Horman, David Brunecz
  Cc: Wei Yongjun, oss-drivers, netdev, kernel-janitors

Fix to return error code -EINVAL instead of 0 when num_vfs above
limit_vfs, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/ethernet/netronome/nfp/nfp_main.c
index c5b9104..cc570bb 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;
 	}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] nfp: fix error return code in nfp_pci_probe()
  2018-01-23  2:10 [PATCH net-next] nfp: fix error return code in nfp_pci_probe() Wei Yongjun
@ 2018-01-23  2:33 ` Jakub Kicinski
  2018-01-23 15:43 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2018-01-23  2:33 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: Simon Horman, David Brunecz, oss-drivers, netdev, kernel-janitors

On Tue, 23 Jan 2018 02:10:27 +0000, Wei Yongjun wrote:
> Fix to return error code -EINVAL instead of 0 when num_vfs above
> limit_vfs, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>

Thanks!  FWIW here is the commit to blame:

Fixes: 0dc786219186 ("nfp: handle SR-IOV already enabled when driver is probing")

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] nfp: fix error return code in nfp_pci_probe()
  2018-01-23  2:10 [PATCH net-next] nfp: fix error return code in nfp_pci_probe() Wei Yongjun
  2018-01-23  2:33 ` Jakub Kicinski
@ 2018-01-23 15:43 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-01-23 15:43 UTC (permalink / raw)
  To: weiyongjun1
  Cc: jakub.kicinski, simon.horman, david.brunecz, oss-drivers, netdev,
	kernel-janitors

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Tue, 23 Jan 2018 02:10:27 +0000

> Fix to return error code -EINVAL instead of 0 when num_vfs above
> limit_vfs, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied, thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-23 15:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23  2:10 [PATCH net-next] nfp: fix error return code in nfp_pci_probe() Wei Yongjun
2018-01-23  2:33 ` Jakub Kicinski
2018-01-23 15:43 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).