USB: storage: ene_ub6250: fix compile warnings
authorFelipe Balbi <balbi@ti.com>
Tue, 15 Nov 2011 07:23:26 +0000 (09:23 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Nov 2011 18:06:16 +0000 (10:06 -0800)
Fix the following compile warning:

| drivers/usb/storage/ene_ub6250.c: In function ‘ms_scsi_write’:
| drivers/usb/storage/ene_ub6250.c:1728:6: warning: ‘result’ may \
| be used uninitialized in this function [-Wuninitialized]
| drivers/usb/storage/ene_ub6250.c:1795:77: warning: ‘offset’ may \
| be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/ene_ub6250.c

index 4dca3ef..9fbe742 100644 (file)
@@ -1762,10 +1762,9 @@ static int ms_scsi_write(struct us_data *us, struct scsi_cmnd *srb)
                result = ene_send_scsi_cmd(us, FDIR_WRITE, scsi_sglist(srb), 1);
        } else {
                void *buf;
-               int offset;
+               int offset = 0;
                u16 PhyBlockAddr;
                u8 PageNum;
-               u32 result;
                u16 len, oldphy, newphy;
 
                buf = kmalloc(blenByte, GFP_KERNEL);