From: Mike Christie <michaelc@cs.wisc.edu>
To: Roland Dreier <rdreier@cisco.com>
Cc: linux-scsi@vger.kernel.org, Karen Xie <kxie@chelsio.com>,
Rakesh Ranjan <rakesh@chelsio.com>,
James Bottomley <James.Bottomley@suse.de>
Subject: Re: [PATCH][SCSI] cxgb3i: Fix error path for module init
Date: Wed, 28 Apr 2010 01:21:39 -0500 [thread overview]
Message-ID: <4BD7D3F3.2070002@cs.wisc.edu> (raw)
In-Reply-To: <adazl0ojfud.fsf@roland-alpha.cisco.com>
On 04/28/2010 12:39 AM, Roland Dreier wrote:
> If cxgb3i_pdu_init() fails, then it appears that cxgb3i_iscsi_init()
> will not be cleaned up, leading to the iscsi transport being left
> registered. Fix this by adding a call to cxgb3i_iscsi_cleanup() on the
> error path.
>
> Signed-off-by: Roland Dreier<rolandd@cisco.com>
> ---
> drivers/scsi/cxgb3i/cxgb3i_init.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/cxgb3i/cxgb3i_init.c b/drivers/scsi/cxgb3i/cxgb3i_init.c
> index d0ab23a..685af36 100644
> --- a/drivers/scsi/cxgb3i/cxgb3i_init.c
> +++ b/drivers/scsi/cxgb3i/cxgb3i_init.c
> @@ -104,8 +104,10 @@ static int __init cxgb3i_init_module(void)
> return err;
>
> err = cxgb3i_pdu_init();
> - if (err< 0)
> + if (err< 0) {
> + cxgb3i_iscsi_cleanup();
> return err;
> + }
>
> cxgb3_register_client(&t3c_client);
>
>
Looks good to me.
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
prev parent reply other threads:[~2010-04-28 6:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 5:39 [PATCH][SCSI] cxgb3i: Fix error path for module init Roland Dreier
2010-04-28 6:21 ` Mike Christie [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=4BD7D3F3.2070002@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@suse.de \
--cc=kxie@chelsio.com \
--cc=linux-scsi@vger.kernel.org \
--cc=rakesh@chelsio.com \
--cc=rdreier@cisco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.