qlcnic: Fix bad kzalloc null test
[ Upstream commit bcaeb886ade124331a6f3a5cef34a3f1484c0a03 ] In qlcnic_83xx_get_reset_instruction_template, the variable of null test is bad, so correct it. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1cb15d3f76
commit
a7ab9af95d
1 changed files with 1 additions and 1 deletions
|
@ -1724,7 +1724,7 @@ static int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *p_d
|
||||||
|
|
||||||
ahw->reset.seq_error = 0;
|
ahw->reset.seq_error = 0;
|
||||||
ahw->reset.buff = kzalloc(QLC_83XX_RESTART_TEMPLATE_SIZE, GFP_KERNEL);
|
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;
|
return -ENOMEM;
|
||||||
|
|
||||||
p_buff = p_dev->ahw->reset.buff;
|
p_buff = p_dev->ahw->reset.buff;
|
||||||
|
|
Loading…
Add table
Reference in a new issue