[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090820151818.22833.40801.stgit@beardog.cce.hp.com>
Date: Thu, 20 Aug 2009 10:18:18 -0500
From: "Stephen M. Cameron" <scameron@...rdog.cce.hp.com>
To: linux-kernel@...r.kernel.org
Cc: linux-scsi@...r.kernel.org, akpm@...ux-foundation.org,
axboe@...nel.dk, andrew.patterson@...com,
mikem@...-ss-1-lb.cnet.com, scameron@...rdog.cce.hp.com
Subject: [cciss: PATCH 07/17] Handle failure of blk_init_queue gracefully in
cciss_add_disk.
Handle failure of blk_init_queue gracefully in cciss_add_disk.
Signed-off-by: Stephen M. Cameron <scameron@...rdog.cce.hp.com>
---
drivers/block/cciss.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 557b958..60fe3c6 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1689,6 +1689,8 @@ static int cciss_add_disk(ctlr_info_t *h, struct gendisk *disk,
int drv_index)
{
disk->queue = blk_init_queue(do_cciss_request, &h->lock);
+ if (!disk->queue)
+ goto init_queue_failure;
sprintf(disk->disk_name, "cciss/c%dd%d", h->ctlr, drv_index);
disk->major = h->major;
disk->first_minor = drv_index << NWD_SHIFT;
@@ -1729,6 +1731,7 @@ static int cciss_add_disk(ctlr_info_t *h, struct gendisk *disk,
cleanup_queue:
blk_cleanup_queue(disk->queue);
disk->queue = NULL;
+init_queue_failure:
return -1;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists