public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] be2iscsi: correct return value in mgmt_invalidate_icds()
@ 2010-05-07  8:53 Dan Carpenter
  2010-05-08  1:34 ` Mike Christie
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-07  8:53 UTC (permalink / raw)
  To: Jayamohan Kallickal; +Cc: James E.J. Bottomley, Mike Christie, linux-scsi

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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] be2iscsi: correct return value in mgmt_invalidate_icds()
  2010-05-07  8:53 [patch] be2iscsi: correct return value in mgmt_invalidate_icds() Dan Carpenter
@ 2010-05-08  1:34 ` Mike Christie
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Christie @ 2010-05-08  1:34 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Jayamohan Kallickal, James E.J. Bottomley, linux-scsi

On 05/07/2010 03:53 AM, Dan Carpenter wrote:
> 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;

You are right. Nice catch.

Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-08  1:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07  8:53 [patch] be2iscsi: correct return value in mgmt_invalidate_icds() Dan Carpenter
2010-05-08  1:34 ` Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox