diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2009-09-17 13:47:24 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-10-01 21:15:42 +0200 |
commit | e8074f79770953be26b64539803d06a46d1a6e58 (patch) | |
tree | 0b6cd25f5ce125182f7248bd1b4b55c64bfc4502 /drivers/block/cciss.c | |
parent | 097d026453e7051a544722f4e05240085916499d (diff) | |
download | kernel_samsung_aries-e8074f79770953be26b64539803d06a46d1a6e58.zip kernel_samsung_aries-e8074f79770953be26b64539803d06a46d1a6e58.tar.gz kernel_samsung_aries-e8074f79770953be26b64539803d06a46d1a6e58.tar.bz2 |
cciss: 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@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r-- | 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 2810dd9..b1211d530 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1690,6 +1690,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; @@ -1730,6 +1732,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; } |