Skip to content

Commit bcaeb88

Browse files
ISCAS-Vulabdavem330
authored andcommitted
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]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1b649e0 commit bcaeb88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,7 @@ static int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *p_d
17201720

17211721
ahw->reset.seq_error = 0;
17221722
ahw->reset.buff = kzalloc(QLC_83XX_RESTART_TEMPLATE_SIZE, GFP_KERNEL);
1723-
if (p_dev->ahw->reset.buff == NULL)
1723+
if (ahw->reset.buff == NULL)
17241724
return -ENOMEM;
17251725

17261726
p_buff = p_dev->ahw->reset.buff;

0 commit comments

Comments
 (0)