From: Dan Carpenter <error27@gmail.com>
To: Jayamohan Kallickal <jayamohank@serverengines.com>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>,
Mike Christie <michaelc@cs.wisc.edu>,
linux-scsi@vger.kernel.org
Subject: [patch] be2iscsi: correct return value in mgmt_invalidate_icds()
Date: Fri, 7 May 2010 10:53:45 +0200 [thread overview]
Message-ID: <20100507085345.GB27064@bicker> (raw)
This function should return 0 on error. Returning -1 would cause a
crash.
Also there is an extra space before the newline character and a missing
space between the "for" and the "mgmt_invalidate_icds". I put the string
on one line. The current version of checkpatch.pl complains that the
line is too long, but it makes grepping easier.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index e641922..350cbea 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -167,10 +167,9 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba,
&nonemb_cmd.dma);
if (nonemb_cmd.va == NULL) {
SE_DEBUG(DBG_LVL_1,
- "Failed to allocate memory for"
- "mgmt_invalidate_icds \n");
+ "Failed to allocate memory for mgmt_invalidate_icds\n");
spin_unlock(&ctrl->mbox_lock);
- return -1;
+ return 0;
}
nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
req = nonemb_cmd.va;
next reply other threads:[~2010-05-07 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 8:53 Dan Carpenter [this message]
2010-05-08 1:34 ` [patch] be2iscsi: correct return value in mgmt_invalidate_icds() Mike Christie
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=20100507085345.GB27064@bicker \
--to=error27@gmail.com \
--cc=James.Bottomley@suse.de \
--cc=jayamohank@serverengines.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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