qlcnic: Fix bad kzalloc null test
Subsystems (3)
PATCH 1/1 qlcnic: Fix bad kzalloc null test
In qlcnic_83xx_get_reset_instruction_template, the variable of null test is bad, so correct it.
Signed-off-by Xu Wang <[email protected]>
--- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +1 -1
@@ -1720,7 +1720,7 @@ static int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *p_d ahw->reset.seq_error =0 ; ahw->reset.buff =kzalloc (QLC_83XX_RESTART_TEMPLATE_SIZE ,GFP_KERNEL ); -if (p_dev->ahw->reset.buff ==NULL ) +if (ahw->reset.buff ==NULL )return -ENOMEM ; p_buff = p_dev->ahw->reset.buff;
Signature · 1 line
2.17.1
From: Xu Wang <[email protected]>
Date: Thu, 26 Mar 2020 18:14:29 +0800
Quoted 4 lines
In
qlcnic_83xx_get_reset_instruction_template, the variable of null test is bad, so correct it.Signed-off-by Xu Wang <[email protected]>
Applied, thanks.