提交 f01f4e6a 编写于 作者: J jack wang 提交者: James Bottomley

[SCSI] pm8001:fix potential NULL pointer dereference

Signed-off-by: NJack Wang <jack_wang@usish.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 0330dba3
......@@ -616,11 +616,11 @@ static int pm8001_dev_found_notify(struct domain_device *dev)
spin_lock_irqsave(&pm8001_ha->lock, flags);
pm8001_device = pm8001_alloc_dev(pm8001_ha);
pm8001_device->sas_device = dev;
if (!pm8001_device) {
res = -1;
goto found_out;
}
pm8001_device->sas_device = dev;
dev->lldd_dev = pm8001_device;
pm8001_device->dev_type = dev->dev_type;
pm8001_device->dcompletion = &completion;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册