Skip to content

Commit

Permalink
qlcnic: Fix bad kzalloc null test
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ISCAS-Vulab authored and davem330 committed Mar 26, 2020
1 parent 1b649e0 commit bcaeb88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bcaeb88

Please sign in to comment.