Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbcLCKPB (ORCPT ); Sat, 3 Dec 2016 05:15:01 -0500 Received: from m50-138.163.com ([123.125.50.138]:41739 "EHLO m50-138.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751292AbcLCKO5 (ORCPT ); Sat, 3 Dec 2016 05:14:57 -0500 From: Pan Bian To: "David S. Miller" , Michael Chan , Prashant Sreedharan , Satish Baddipadige , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Pan Bian Subject: [PATCH 1/1] netdev: broadcom: propagate error code Date: Sat, 3 Dec 2016 17:56:17 +0800 Message-Id: <1480758977-4234-1-git-send-email-bianpan2016@163.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: C9GowACHBgjBlkJYKO8dIQ--.54795S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7GrWxGrWfWw13tr43KF47twb_yoWftFc_Gr 1UXF1fKrs8CryF9w18CrW3J3s5KF4jqwsY9F1fK39Iyw1UArnFya1v9as8Xw13Wr48AF98 Gr1xta4jvwn8KjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnpyxJUUUUU== X-Originating-IP: [222.131.246.88] X-CM-SenderInfo: held01tdqsiiqw6rljoofrz/xtbBUQg1claDsTtGugACs- Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 885 Lines: 27 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 --- 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