From: Francois Romieu <romieu@fr.zoreil.com>
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: Thu, 4 Sep 2003 00:53:18 +0200 [thread overview]
Message-ID: <20030904005318.A14780@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20030903223347.GA11071@beardog.cca.cpqcorp.net>; from mike.miller@hp.com on Wed, Sep 03, 2003 at 05:33:47PM -0500
mike.miller@hp.com <mike.miller@hp.com> :
> 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.
[...]
> +clean4:
> + if(hba[i]->cmd_pool_bits)
> + kfree(hba[i]->cmd_pool_bits);
> + if(hba[i]->cmd_pool)
> + pci_free_consistent(hba[i]->pdev,
> + NR_CMDS * sizeof(CommandList_struct),
> + hba[i]->cmd_pool, hba[i]->cmd_pool_dhandle);
> + if(hba[i]->errinfo_pool)
> + pci_free_consistent(hba[i]->pdev,
> + NR_CMDS * sizeof( ErrorInfo_struct),
> + hba[i]->errinfo_pool,
> + hba[i]->errinfo_pool_dhandle);
> +clean3:
> + free_irq(hba[i]->intr, hba[i]);
> +clean2:
> + unregister_blkdev(COMPAQ_CISS_MAJOR+i, hba[i]->devname);
> +clean1:
> + release_io_mem(hba[i]);
> +clean0:
> + free_hba(i);
> + return(-1);
> }
Would you mind to change the cleanX exit labels to more descriptive names ?
Say err_free_hba, err_free_irq for example.
Moreover, note that the same tests (the "if"s) are done twice.
--
Ueimor
prev parent reply other threads:[~2003-09-03 22:58 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
2003-09-03 22:53 ` Francois Romieu [this message]
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=20030904005318.A14780@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--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®