All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe()
@ 2018-01-23  2:10 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2018-01-23  2:10 UTC (permalink / raw)
  To: David Arcari, Colin Ian King, David VomLehn, Igor Russkikh,
	Pavel Belous, Dmitrii Tarakanov, Alexander Loktionov
  Cc: Wei Yongjun, netdev, kernel-janitors

Fix to return error code -ENOMEM from the aq_ndev_alloc() error
handling case instead of 0, as done elsewhere in this function.

Fixes: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index f5dd5f7..5cf3542 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -210,8 +210,10 @@ static int aq_pci_probe(struct pci_dev *pdev,
 		goto err_pci_func;
 
 	ndev = aq_ndev_alloc();
-	if (!ndev)
+	if (!ndev) {
+		err = -ENOMEM;
 		goto err_ndev;
+	}
 
 	self = netdev_priv(ndev);
 	self->pdev = pdev;


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

* [PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe()
@ 2018-01-23  2:10 ` Wei Yongjun
  0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2018-01-23  2:10 UTC (permalink / raw)
  To: David Arcari, Colin Ian King, David VomLehn, Igor Russkikh,
	Pavel Belous, Dmitrii Tarakanov, Alexander Loktionov
  Cc: Wei Yongjun, netdev, kernel-janitors

Fix to return error code -ENOMEM from the aq_ndev_alloc() error
handling case instead of 0, as done elsewhere in this function.

Fixes: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index f5dd5f7..5cf3542 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -210,8 +210,10 @@ static int aq_pci_probe(struct pci_dev *pdev,
 		goto err_pci_func;
 
 	ndev = aq_ndev_alloc();
-	if (!ndev)
+	if (!ndev) {
+		err = -ENOMEM;
 		goto err_ndev;
+	}
 
 	self = netdev_priv(ndev);
 	self->pdev = pdev;


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

* Re: [PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe()
  2018-01-23  2:10 ` Wei Yongjun
@ 2018-01-23  7:14   ` Igor Russkikh
  -1 siblings, 0 replies; 6+ messages in thread
From: Igor Russkikh @ 2018-01-23  7:14 UTC (permalink / raw)
  To: Wei Yongjun, David Arcari, Colin Ian King, David VomLehn,
	Pavel Belous, Dmitrii Tarakanov, Alexander Loktionov
  Cc: netdev, kernel-janitors


> Fix to return error code -ENOMEM from the aq_ndev_alloc() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: Igor Russkikh <igor.russkikh@aquantia.com>


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

* Re: [PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe()
@ 2018-01-23  7:14   ` Igor Russkikh
  0 siblings, 0 replies; 6+ messages in thread
From: Igor Russkikh @ 2018-01-23  7:14 UTC (permalink / raw)
  To: Wei Yongjun, David Arcari, Colin Ian King, David VomLehn,
	Pavel Belous, Dmitrii Tarakanov, Alexander Loktionov
  Cc: netdev, kernel-janitors


> Fix to return error code -ENOMEM from the aq_ndev_alloc() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Acked-by: Igor Russkikh <igor.russkikh@aquantia.com>


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

* Re: [PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe()
  2018-01-23  2:10 ` Wei Yongjun
@ 2018-01-23 16:00   ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-01-23 16:00 UTC (permalink / raw)
  To: weiyongjun1
  Cc: darcari, colin.king, vomlehn, igor.russkikh, pavel.belous,
	Dmitrii.Tarakanov, Alexander.Loktionov, netdev, kernel-janitors

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

> Fix to return error code -ENOMEM from the aq_ndev_alloc() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

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

* Re: [PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe()
@ 2018-01-23 16:00   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-01-23 16:00 UTC (permalink / raw)
  To: weiyongjun1
  Cc: darcari, colin.king, vomlehn, igor.russkikh, pavel.belous,
	Dmitrii.Tarakanov, Alexander.Loktionov, netdev, kernel-janitors

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

> Fix to return error code -ENOMEM from the aq_ndev_alloc() error
> handling case instead of 0, as done elsewhere in this function.
> 
> Fixes: 23ee07ad3c2f ("net: aquantia: Cleanup pci functions module")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23  2:10 [PATCH net-next] net: aquantia: Fix error return code in aq_pci_probe() Wei Yongjun
2018-01-23  2:10 ` Wei Yongjun
2018-01-23  7:14 ` Igor Russkikh
2018-01-23  7:14   ` Igor Russkikh
2018-01-23 16:00 ` David Miller
2018-01-23 16:00   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.