Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299105 > unrolled thread

[PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args

Started byInsu Yun <wuninsu@gmail.com>
First post2015-12-29 21:00 +0100
Last post2015-12-29 21:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args Insu Yun <wuninsu@gmail.com> - 2015-12-29 21:00 +0100

#1299105 — [PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args

FromInsu Yun <wuninsu@gmail.com>
Date2015-12-29 21:00 +0100
Subject[PATCH] qlcnic: correctly handle qlcnic_alloc_mbx_args
Message-ID<qL8B4-4SX-15@gated-at.bofh.it>
Since qlcnic_alloc_mbx_args can be failed, 
return value should be checked.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
index a5f422f..daf0515 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
@@ -772,8 +772,10 @@ int qlcnic_82xx_config_intrpt(struct qlcnic_adapter *adapter, u8 op_type)
 	int i, err = 0;
 
 	for (i = 0; i < ahw->num_msix; i++) {
-		qlcnic_alloc_mbx_args(&cmd, adapter,
-				      QLCNIC_CMD_MQ_TX_CONFIG_INTR);
+		err = qlcnic_alloc_mbx_args(&cmd, adapter,
+					    QLCNIC_CMD_MQ_TX_CONFIG_INTR);
+		if (err)
+			return err;
 		type = op_type ? QLCNIC_INTRPT_ADD : QLCNIC_INTRPT_DEL;
 		val = type | (ahw->intr_tbl[i].type << 4);
 		if (ahw->intr_tbl[i].type == QLCNIC_INTRPT_MSIX)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web