Re: [PATCH -tip][SCSI] scsi: scsi_transport_iscsi.c initialize thevariable before it get used

From: Mike Christie
Date: Tue May 26 2009 - 18:26:36 EST


This is a multi-part message in MIME format.Jaswinder Singh Rajput wrote:
I am watching this problem from long time in -tip.

Subject: [PATCH] scsi: scsi_transport_iscsi.c initialize the variable before it get used

In some cases, err will be used uninitialized.


As you guys already discussed it will not get used uninitialized.

Also fixed compilation warning :

CC drivers/scsi/scsi_transport_iscsi.o
drivers/scsi/scsi_transport_iscsi.c: In function âiscsi_add_sessionâ:
drivers/scsi/scsi_transport_iscsi.c:678: warning: âerrâ may be used uninitialized in this function


I did the attached patch to silence the compile warning. I goofed and forgot to send it before, because I had change my compiler and was not seeing the error message. I was planning on sending the attached with some other changes for the next feature window. I am going to fix up the patch to use UINT_MAX like James mentioned in the thread.