From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Mike Christie <michaelc@cs.wisc.edu>
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: [PATCH] scsi: fix uninitialized variable in iscsi
Date: Wed, 29 Oct 2008 17:03:59 +1100 [thread overview]
Message-ID: <20081029170359.70682e02.sfr@canb.auug.org.au> (raw)
[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;
}
}
--
1.5.6.5
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
next reply other threads:[~2008-10-29 6:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 6:03 Stephen Rothwell [this message]
2008-10-29 15:44 ` Mike Christie
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=20081029170359.70682e02.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=open-iscsi@googlegroups.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®