aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2010-02-04 09:43:36 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-02-17 14:23:03 -0500
commit23231048309ea8eed0189f1eb8f870f08703cac0 (patch)
treea20af6308d43163db7a9891d40add49534fb12bf /drivers/scsi
parentc7f172dca210bbd105aee02353c6b385c774caac (diff)
[SCSI] hpsa: Fix hpsa_find_scsi_entry so that it doesn't try to dereference NULL pointers
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/hpsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 42295c49682f..2764cb605693 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -776,6 +776,8 @@ static int hpsa_scsi_find_entry(struct hpsa_scsi_dev_t *needle,
776#define DEVICE_CHANGED 1 776#define DEVICE_CHANGED 1
777#define DEVICE_SAME 2 777#define DEVICE_SAME 2
778 for (i = 0; i < haystack_size; i++) { 778 for (i = 0; i < haystack_size; i++) {
779 if (haystack[i] == NULL) /* previously removed. */
780 continue;
779 if (SCSI3ADDR_EQ(needle->scsi3addr, haystack[i]->scsi3addr)) { 781 if (SCSI3ADDR_EQ(needle->scsi3addr, haystack[i]->scsi3addr)) {
780 *index = i; 782 *index = i;
781 if (device_is_the_same(needle, haystack[i])) 783 if (device_is_the_same(needle, haystack[i]))