summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorjack wang <jack_wang@usish.com>2009-12-07 10:22:55 +0100
committerJames Bottomley <James.Bottomley@suse.de>2009-12-10 17:05:25 +0100
commitf01f4e6a1cb343fc75dc580ec9203d9719f78f95 (patch)
treee432bd253fde4bf17e4f081222a2b80baaff48e6 /drivers
parent[SCSI] pm8001: set SSC down-spreading only to get less errors on some 6G device. (diff)
downloadlinux-f01f4e6a1cb343fc75dc580ec9203d9719f78f95.tar.xz
linux-f01f4e6a1cb343fc75dc580ec9203d9719f78f95.zip
[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')
-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)
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;