mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
qlcnic: Fix bad kzalloc null test
[ Upstream commit bcaeb886ad ]
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:
committed by
Greg Kroah-Hartman
parent
d7f6f2b0be
commit
28f5b6ee1c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user