From: Mike Christie <michaelc@cs.wisc.edu>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: open-iscsi@googlegroups.com,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: fix uninitialized variable in iscsi
Date: Wed, 29 Oct 2008 10:44:12 -0500 [thread overview]
Message-ID: <490884CC.9060106@cs.wisc.edu> (raw)
In-Reply-To: <20081029170359.70682e02.sfr@canb.auug.org.au>
Stephen Rothwell wrote:
> [Resend to get through vger's filters, sorry]
>
> drivers/scsi/scsi_transport_iscsi.c: In function 'iscsi_add_session':
> drivers/scsi/scsi_transport_iscsi.c:704: warning: 'err' may be used uninitialized in this function
>
> Indeed the error path can be taken without err being set.
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> drivers/scsi/scsi_transport_iscsi.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> I don't know if ENOMEM is the proper error code to return.
>
> diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
> index 4a803eb..99855db 100644
> --- a/drivers/scsi/scsi_transport_iscsi.c
> +++ b/drivers/scsi/scsi_transport_iscsi.c
> @@ -719,6 +719,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
> "Too many iscsi targets. Max "
> "number of targets is %d.\n",
> ISCSI_MAX_TARGET - 1);
> + err = -ENOMEM;
> goto release_host;
> }
> }
Thanks for the patch.
I have a patch for this from Benny Halevy already.
next prev parent reply other threads:[~2008-10-29 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 6:03 [PATCH] scsi: fix uninitialized variable in iscsi Stephen Rothwell
2008-10-29 15:44 ` Mike Christie [this message]
2008-10-29 22:38 ` Stephen Rothwell
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=490884CC.9060106@cs.wisc.edu \
--to=michaelc@cs.wisc.edu \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=open-iscsi@googlegroups.com \
--cc=sfr@canb.auug.org.au \
/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