From 67c472f1e37b3c0a24bfa35695d24f6f7888a178 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Tue, 31 Jul 2007 00:39:39 -0700 Subject: [PATCH] --- yaml --- r: 63372 b: refs/heads/master c: f2912a1223c0917a7b4e054f18086209137891ea h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/block/cciss.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0075fb0db24c..37e1e8626814 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ff0cfc66cd99d59e3a8024003171035e4ae192b7 +refs/heads/master: f2912a1223c0917a7b4e054f18086209137891ea diff --git a/trunk/drivers/block/cciss.c b/trunk/drivers/block/cciss.c index 1be82d544dc3..a11b2bd54bbe 100644 --- a/trunk/drivers/block/cciss.c +++ b/trunk/drivers/block/cciss.c @@ -3227,12 +3227,15 @@ static int alloc_cciss_hba(void) for (i = 0; i < MAX_CTLR; i++) { if (!hba[i]) { ctlr_info_t *p; + p = kzalloc(sizeof(ctlr_info_t), GFP_KERNEL); if (!p) goto Enomem; p->gendisk[0] = alloc_disk(1 << NWD_SHIFT); - if (!p->gendisk[0]) + if (!p->gendisk[0]) { + kfree(p); goto Enomem; + } hba[i] = p; return i; }