aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInsu Yun <wuninsu@gmail.com>2015-12-29 15:02:18 -0500
committerDavid S. Miller <davem@davemloft.net>2016-01-04 17:14:30 -0500
commitb77357b69225a8e68d222451911feab50f2c6652 (patch)
treeaa611f4d064d26a1f48274104b7fcf8cf539c5e9
parent9c982e86dbdbaa3fb248dfc776dddda32cbc8927 (diff)
qlcnic: correctly handle qlcnic_alloc_mbx_args
Since qlcnic_alloc_mbx_args can be failed, return value should be checked. Signed-off-by: Insu Yun <wuninsu@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c6
1 files 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 a5f422f26cb4..daf05155b732 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)
772 int i, err = 0; 772 int i, err = 0;
773 773
774 for (i = 0; i < ahw->num_msix; i++) { 774 for (i = 0; i < ahw->num_msix; i++) {
775 qlcnic_alloc_mbx_args(&cmd, adapter, 775 err = qlcnic_alloc_mbx_args(&cmd, adapter,
776 QLCNIC_CMD_MQ_TX_CONFIG_INTR); 776 QLCNIC_CMD_MQ_TX_CONFIG_INTR);
777 if (err)
778 return err;
777 type = op_type ? QLCNIC_INTRPT_ADD : QLCNIC_INTRPT_DEL; 779 type = op_type ? QLCNIC_INTRPT_ADD : QLCNIC_INTRPT_DEL;
778 val = type | (ahw->intr_tbl[i].type << 4); 780 val = type | (ahw->intr_tbl[i].type << 4);
779 if (ahw->intr_tbl[i].type == QLCNIC_INTRPT_MSIX) 781 if (ahw->intr_tbl[i].type == QLCNIC_INTRPT_MSIX)