Commit 806df3ac authored by Jingoo Han's avatar Jingoo Han Committed by Greg Kroah-Hartman

USB: ums_realtek: fix build warning

When rts51x_read_status() returns USB_STOR_TRANSPORT_ERROR,
an error happens. This patch fixes build warning as below:

drivers/usb/storage/realtek_cr.c: In function 'init_realtek_cr':
drivers/usb/storage/realtek_cr.c:476:33: warning: 'buf[15]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[15]' was declared here
drivers/usb/storage/realtek_cr.c:475:33: warning: 'buf[14]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[14]' was declared here
drivers/usb/storage/realtek_cr.c:474:50: warning: 'buf[13]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[13]' was declared here
drivers/usb/storage/realtek_cr.c:472:30: warning: 'buf[12]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[12]' was declared here
drivers/usb/storage/realtek_cr.c:471:31: warning: 'buf[11]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[11]' was declared here
drivers/usb/storage/realtek_cr.c:470:31: warning: 'buf[10]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[10]' was declared here
drivers/usb/storage/realtek_cr.c:469:30: warning: 'buf[9]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[9]' was declared here
drivers/usb/storage/realtek_cr.c:468:27: warning: 'buf[8]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[8]' was declared here
drivers/usb/storage/realtek_cr.c:468:43: warning: 'buf[7]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[7]' was declared here
drivers/usb/storage/realtek_cr.c:467:30: warning: 'buf[6]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[6]' was declared here
drivers/usb/storage/realtek_cr.c:466:30: warning: 'buf[5]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[5]' was declared here
drivers/usb/storage/realtek_cr.c:465:28: warning: 'buf[4]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[4]' was declared here
drivers/usb/storage/realtek_cr.c:464:24: warning: 'buf[3]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[3]' was declared here
drivers/usb/storage/realtek_cr.c:464:40: warning: 'buf[2]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[2]' was declared here
drivers/usb/storage/realtek_cr.c:463:24: warning: 'buf[1]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[1]' was declared here
drivers/usb/storage/realtek_cr.c:463:40: warning: 'buf[0]' may be used uninitialized in this function [-Wuninitialized]
drivers/usb/storage/realtek_cr.c:455:5: note: 'buf[0]' was declared here
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5fb0432e
...@@ -455,7 +455,7 @@ static int rts51x_check_status(struct us_data *us, u8 lun) ...@@ -455,7 +455,7 @@ static int rts51x_check_status(struct us_data *us, u8 lun)
u8 buf[16]; u8 buf[16];
retval = rts51x_read_status(us, lun, buf, 16, &(chip->status_len)); retval = rts51x_read_status(us, lun, buf, 16, &(chip->status_len));
if (retval < 0) if (retval != STATUS_SUCCESS)
return -EIO; return -EIO;
US_DEBUGP("chip->status_len = %d\n", chip->status_len); US_DEBUGP("chip->status_len = %d\n", chip->status_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment