* [PATCH net] bnxt_en: fix error return code in bnxt_init_one()
@ 2020-11-18 12:17 Zhang Changzhong
2020-11-19 18:53 ` Edwin Peer
0 siblings, 1 reply; 3+ messages in thread
From: Zhang Changzhong @ 2020-11-18 12:17 UTC (permalink / raw)
To: michael.chan, davem, kuba; +Cc: netdev, linux-kernel
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: c213eae8d3cd ("bnxt_en: Improve VF/PF link change logic.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 7c21aaa8..092775e 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -12674,6 +12674,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
create_singlethread_workqueue("bnxt_pf_wq");
if (!bnxt_pf_wq) {
dev_err(&pdev->dev, "Unable to create workqueue.\n");
+ rc = -ENOMEM;
goto init_err_pci_clean;
}
}
--
2.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] bnxt_en: fix error return code in bnxt_init_one()
2020-11-18 12:17 [PATCH net] bnxt_en: fix error return code in bnxt_init_one() Zhang Changzhong
@ 2020-11-19 18:53 ` Edwin Peer
2020-11-20 5:50 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Edwin Peer @ 2020-11-19 18:53 UTC (permalink / raw)
To: Zhang Changzhong
Cc: Michael Chan, David S . Miller, Jakub Kicinski, netdev,
Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]
On Wed, Nov 18, 2020 at 4:17 AM Zhang Changzhong
<zhangchangzhong@huawei.com> wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: c213eae8d3cd ("bnxt_en: Improve VF/PF link change logic.")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 7c21aaa8..092775e 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -12674,6 +12674,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
> create_singlethread_workqueue("bnxt_pf_wq");
> if (!bnxt_pf_wq) {
> dev_err(&pdev->dev, "Unable to create workqueue.\n");
> + rc = -ENOMEM;
> goto init_err_pci_clean;
> }
> }
> --
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Regards,
Edwin Peer
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4160 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] bnxt_en: fix error return code in bnxt_init_one()
2020-11-19 18:53 ` Edwin Peer
@ 2020-11-20 5:50 ` Jakub Kicinski
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2020-11-20 5:50 UTC (permalink / raw)
To: Edwin Peer
Cc: Zhang Changzhong, Michael Chan, David S . Miller, netdev,
Linux Kernel Mailing List
On Thu, 19 Nov 2020 10:53:47 -0800 Edwin Peer wrote:
> > Fix to return a negative error code from the error handling
> > case instead of 0, as done elsewhere in this function.
> >
> > Fixes: c213eae8d3cd ("bnxt_en: Improve VF/PF link change logic.")
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
>
> Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-20 5:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 12:17 [PATCH net] bnxt_en: fix error return code in bnxt_init_one() Zhang Changzhong
2020-11-19 18:53 ` Edwin Peer
2020-11-20 5:50 ` Jakub Kicinski
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).