Skip to content

Commit

Permalink
[SCSI] pm8001:fix potential NULL pointer dereference
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Wang <jack_wang@usish.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
jack wang authored and James Bottomley committed Dec 10, 2009
1 parent 0330dba commit f01f4e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/pm8001/pm8001_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f01f4e6

Please sign in to comment.