Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b77357b6 authored by Insu Yun's avatar Insu Yun Committed by David S. Miller
Browse files

qlcnic: correctly handle qlcnic_alloc_mbx_args



Since qlcnic_alloc_mbx_args can be failed,
return value should be checked.

Signed-off-by: default avatarInsu Yun <wuninsu@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9c982e86
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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,
		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)