public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
To: james.bottomley@parallels.com
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	stephenmcameron@gmail.com, joseph.t.handzik@hp.com,
	thenzl@redhat.com, michael.miller@canonical.com, elliott@hp.com,
	scott.teel@hp.com, hch@lst.de
Subject: [PATCH 3/5] hpsa: make hpsa_init_one return -ENOMEM if allocation of h->lockup_detected fails
Date: Thu, 03 Jul 2014 10:18:08 -0500	[thread overview]
Message-ID: <20140703151808.22132.99138.stgit@beardog.cce.hp.com> (raw)
In-Reply-To: <20140703151534.22132.49663.stgit@beardog.cce.hp.com>

From: Stephen M. Cameron <scameron@beardog.cce.hp.com>

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Reviewed-by: Joe Handzik <joseph.t.handzik@hp.com>
---
 drivers/scsi/hpsa.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 08b34e9..794d726 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6999,8 +6999,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);


  parent reply	other threads:[~2014-07-03 15:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 15:17 [PATCH 0/5] hpsa a few small updates for early July 2014 Stephen M. Cameron
2014-07-03 15:17 ` [PATCH 1/5] hpsa: remove online devices from offline device list Stephen M. Cameron
2014-07-03 15:18 ` [PATCH 2/5] hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl Stephen M. Cameron
2014-07-03 15:18 ` Stephen M. Cameron [this message]
2014-07-03 15:18 ` [PATCH 4/5] hpsa: fix 6-byte READ/WRITE with 0 length data xfer Stephen M. Cameron
2014-07-03 15:18 ` [PATCH 5/5] hpsa: do not unconditionally copy sense data Stephen M. Cameron
2014-07-03 17:31 ` [PATCH 0/5] hpsa a few small updates for early July 2014 Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140703151808.22132.99138.stgit@beardog.cce.hp.com \
    --to=scameron@beardog.cce.hp.com \
    --cc=elliott@hp.com \
    --cc=hch@lst.de \
    --cc=james.bottomley@parallels.com \
    --cc=joseph.t.handzik@hp.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.miller@canonical.com \
    --cc=scott.teel@hp.com \
    --cc=stephenmcameron@gmail.com \
    --cc=thenzl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox