Stephen Rothwell wrote:
> [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 <[EMAIL PROTECTED]>
> ---
>  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;
>               }
>       }

Thanks for the patch.

I have a patch for this from Benny Halevy already.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to