aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorjack wang <jack_wang@usish.com>2009-12-07 04:22:55 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-10 11:05:25 -0500
commitf01f4e6a1cb343fc75dc580ec9203d9719f78f95 (patch)
treee432bd253fde4bf17e4f081222a2b80baaff48e6 /drivers/scsi
parent0330dba36127768a2e2df2eabb902b5530102871 (diff)
[SCSI] pm8001:fix potential NULL pointer dereference
Signed-off-by: Jack Wang <jack_wang@usish.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/pm8001/pm8001_sas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index 49721c886c26..487f78ff750b 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -616,11 +616,11 @@ static int pm8001_dev_found_notify(struct domain_device *dev)
616 spin_lock_irqsave(&pm8001_ha->lock, flags); 616 spin_lock_irqsave(&pm8001_ha->lock, flags);
617 617
618 pm8001_device = pm8001_alloc_dev(pm8001_ha); 618 pm8001_device = pm8001_alloc_dev(pm8001_ha);
619 pm8001_device->sas_device = dev;
620 if (!pm8001_device) { 619 if (!pm8001_device) {
621 res = -1; 620 res = -1;
622 goto found_out; 621 goto found_out;
623 } 622 }
623 pm8001_device->sas_device = dev;
624 dev->lldd_dev = pm8001_device; 624 dev->lldd_dev = pm8001_device;
625 pm8001_device->dev_type = dev->dev_type; 625 pm8001_device->dev_type = dev->dev_type;
626 pm8001_device->dcompletion = &completion; 626 pm8001_device->dcompletion = &completion;