From: Andrew Morton <akpm@osdl.org>
To: mike.miller@hp.com
Cc: axboe@suse.de, linux-kernel@vger.kernel.org
Subject: Re: cciss error handling patch for 2.6.0-test4
Date: Wed, 3 Sep 2003 15:33:32 -0700 [thread overview]
Message-ID: <20030903153332.2a5f03e7.akpm@osdl.org> (raw)
In-Reply-To: <20030903223347.GA11071@beardog.cca.cpqcorp.net>
mike.miller@hp.com wrote:
>
> This patch was built & tested using 2.6.0-test4. It _hopefully_ cleans up the error handling in cciss_init_one().
> Please consider this for inclusion in the 2.6.0 kernel.
>
> Thanks,
> mikem
> ------------------------------------------------------------------------------
> diff -burN lx260test4-p1/drivers/block/cciss.c lx260test4/drivers/block/cciss.c
> --- lx260test4-p1/drivers/block/cciss.c 2003-08-26 13:09:45.000000000 -0500
> +++ lx260test4/drivers/block/cciss.c 2003-08-26 14:01:12.000000000 -0500
> @@ -2447,11 +2447,8 @@
> if( i < 0 )
> return (-1);
> if (cciss_pci_init(hba[i], pdev) != 0)
> - {
> - release_io_mem(hba[i]);
> - free_hba(i);
> - return (-1);
> - }
> + goto clean1;
> +
> sprintf(hba[i]->devname, "cciss%d", i);
> hba[i]->ctlr = i;
> hba[i]->pdev = pdev;
> @@ -2463,28 +2460,23 @@
> printk("cciss: not using DAC cycles\n");
> else {
> printk("cciss: no suitable DMA available\n");
> - free_hba(i);
> - return -ENODEV;
> + goto clean0;
> }
But that change propagates an existing bug: a missing release_iomem().
This additional change is needed.
diff -puN drivers/block/cciss.c~cciss-error-handling-cleanup-fix drivers/block/cciss.c
--- 25/drivers/block/cciss.c~cciss-error-handling-cleanup-fix Wed Sep 3 15:31:30 2003
+++ 25-akpm/drivers/block/cciss.c Wed Sep 3 15:31:40 2003
@@ -2460,7 +2460,7 @@ static int __init cciss_init_one(struct
printk("cciss: not using DAC cycles\n");
else {
printk("cciss: no suitable DMA available\n");
- goto clean0;
+ goto clean1;
}
if (register_blkdev(COMPAQ_CISS_MAJOR+i, hba[i]->devname)) {
@@ -2568,7 +2568,6 @@ clean2:
unregister_blkdev(COMPAQ_CISS_MAJOR+i, hba[i]->devname);
clean1:
release_io_mem(hba[i]);
-clean0:
free_hba(i);
return(-1);
}
_
next prev parent reply other threads:[~2003-09-03 22:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-03 22:33 mike.miller
2003-09-03 22:33 ` Andrew Morton [this message]
2003-09-03 22:53 ` Francois Romieu
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=20030903153332.2a5f03e7.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.miller@hp.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
all inboxes | Powered by JetHome®