Skip to content

Commit

Permalink
[SCSI] be2iscsi: correct return value in mgmt_invalidate_icds()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and James Bottomley committed May 24, 2010
1 parent f4b87de commit e6b50c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/scsi/be2iscsi/be_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e6b50c3

Please sign in to comment.