linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] netdev: broadcom: propagate error code
@ 2016-12-03  9:56 Pan Bian
  2016-12-03 18:50 ` Michael Chan
  2016-12-05 18:26 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Pan Bian @ 2016-12-03  9:56 UTC (permalink / raw)
  To: David S. Miller, Michael Chan, Prashant Sreedharan,
	Satish Baddipadige, netdev
  Cc: linux-kernel, Pan Bian

Function bnxt_hwrm_stat_ctx_alloc() always returns 0, even if the call
to _hwrm_send_message() fails. It may be better to propagate the errors
to the caller of bnxt_hwrm_stat_ctx_alloc().

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188661

Signed-off-by: Pan Bian <bianpan2016@163.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index ee1a803..f08a20b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -4120,7 +4120,7 @@ static int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp)
 		bp->grp_info[i].fw_stats_ctx = cpr->hw_stats_ctx_id;
 	}
 	mutex_unlock(&bp->hwrm_cmd_lock);
-	return 0;
+	return rc;
 }
 
 static int bnxt_hwrm_func_qcfg(struct bnxt *bp)
-- 
1.9.1

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

* Re: [PATCH 1/1] netdev: broadcom: propagate error code
  2016-12-03  9:56 [PATCH 1/1] netdev: broadcom: propagate error code Pan Bian
@ 2016-12-03 18:50 ` Michael Chan
  2016-12-05 18:26 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Chan @ 2016-12-03 18:50 UTC (permalink / raw)
  To: Pan Bian
  Cc: David S. Miller, Prashant Sreedharan, Satish Baddipadige, Netdev,
	open list

On Sat, Dec 3, 2016 at 1:56 AM, Pan Bian <bianpan2016@163.com> wrote:
> Function bnxt_hwrm_stat_ctx_alloc() always returns 0, even if the call
> to _hwrm_send_message() fails. It may be better to propagate the errors
> to the caller of bnxt_hwrm_stat_ctx_alloc().
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188661
>
> Signed-off-by: Pan Bian <bianpan2016@163.com>

Acked-by: Michael Chan <michael.chan@broadcom.com>

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

* Re: [PATCH 1/1] netdev: broadcom: propagate error code
  2016-12-03  9:56 [PATCH 1/1] netdev: broadcom: propagate error code Pan Bian
  2016-12-03 18:50 ` Michael Chan
@ 2016-12-05 18:26 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-12-05 18:26 UTC (permalink / raw)
  To: bianpan2016
  Cc: michael.chan, prashant.sreedharan, sbaddipa, netdev, linux-kernel

From: Pan Bian <bianpan2016@163.com>
Date: Sat,  3 Dec 2016 17:56:17 +0800

> Function bnxt_hwrm_stat_ctx_alloc() always returns 0, even if the call
> to _hwrm_send_message() fails. It may be better to propagate the errors
> to the caller of bnxt_hwrm_stat_ctx_alloc().
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188661
> 
> Signed-off-by: Pan Bian <bianpan2016@163.com>

Applied.

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

end of thread, other threads:[~2016-12-05 18:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-03  9:56 [PATCH 1/1] netdev: broadcom: propagate error code Pan Bian
2016-12-03 18:50 ` Michael Chan
2016-12-05 18:26 ` 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).