summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2014-07-03 10:18:08 -0500
committerChristoph Hellwig <hch@lst.de>2014-07-25 17:16:59 -0400
commit2a5ac32653786871f03a22ecd524617cf53e1b53 (patch)
tree33e40a3ef0ec118aaed876517ea554aa87bb12e2 /drivers/scsi/hpsa.c
parent3b7f040ac6531f7973814859094e53cb6bbd7287 (diff)
hpsa: make hpsa_init_one return -ENOMEM if allocation of h->lockup_detected fails
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Reviewed-by: Joe Handzik <joseph.t.handzik@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index a59e1e022e3..1d284730d66 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6995,8 +6995,10 @@ reinit_after_soft_reset:
/* Allocate and clear per-cpu variable lockup_detected */
h->lockup_detected = alloc_percpu(u32);
- if (!h->lockup_detected)
+ if (!h->lockup_detected) {
+ rc = -ENOMEM;
goto clean1;
+ }
set_lockup_detected_for_all_cpus(h, 0);
rc = hpsa_pci_init(h);