From: Stephen M. Cameron Date: Thu, 3 Jul 2014 15:18:08 +0000 (-0500) Subject: hpsa: make hpsa_init_one return -ENOMEM if allocation of h->lockup_detected fails X-Git-Tag: v3.17-rc1~100^2~42 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2a5ac32653786871f03a22ecd524617cf53e1b53;p=karo-tx-linux.git hpsa: make hpsa_init_one return -ENOMEM if allocation of h->lockup_detected fails Signed-off-by: Stephen M. Cameron Reviewed-by: Joe Handzik Signed-off-by: Christoph Hellwig --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index a59e1e022e37..1d284730d66b 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);