diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-07 04:53:45 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-05-24 12:11:03 -0400 |
commit | e6b50c30fa8d46c9401c2d48eee2351bdbb4c51c (patch) | |
tree | eea4f5077ba4367bde3bffb89545abb5eb08ad77 /drivers/scsi/be2iscsi | |
parent | f4b87dee923342505e1ddba8d34ce9de33e75050 (diff) |
[SCSI] be2iscsi: correct return value in mgmt_invalidate_icds()
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>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r-- | drivers/scsi/be2iscsi/be_mgmt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index e641922f20bc..350cbeaae160 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, | |||
167 | &nonemb_cmd.dma); | 167 | &nonemb_cmd.dma); |
168 | if (nonemb_cmd.va == NULL) { | 168 | if (nonemb_cmd.va == NULL) { |
169 | SE_DEBUG(DBG_LVL_1, | 169 | SE_DEBUG(DBG_LVL_1, |
170 | "Failed to allocate memory for" | 170 | "Failed to allocate memory for mgmt_invalidate_icds\n"); |
171 | "mgmt_invalidate_icds \n"); | ||
172 | spin_unlock(&ctrl->mbox_lock); | 171 | spin_unlock(&ctrl->mbox_lock); |
173 | return -1; | 172 | return 0; |
174 | } | 173 | } |
175 | nonemb_cmd.size = sizeof(struct invalidate_commands_params_in); | 174 | nonemb_cmd.size = sizeof(struct invalidate_commands_params_in); |
176 | req = nonemb_cmd.va; | 175 | req = nonemb_cmd.va; |