Message ID | 1605701851-20270-1-git-send-email-zhangchangzhong@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] bnxt_en: fix error return code in bnxt_init_one() | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net |
netdev/subject_prefix | success | Link |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 7 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
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
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!
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; } }
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(+)