aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/protocol.c2
-rw-r--r--drivers/usb/storage/sddr55.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c
index 958f5b17847c..b9b8ede61fb3 100644
--- a/drivers/usb/storage/protocol.c
+++ b/drivers/usb/storage/protocol.c
@@ -170,7 +170,6 @@ unsigned int usb_stor_access_xfer_buf(unsigned char *buffer,
170 170
171 if (!sg) 171 if (!sg)
172 sg = scsi_sglist(srb); 172 sg = scsi_sglist(srb);
173 buflen = min(buflen, scsi_bufflen(srb));
174 173
175 /* This loop handles a single s-g list entry, which may 174 /* This loop handles a single s-g list entry, which may
176 * include multiple pages. Find the initial page structure 175 * include multiple pages. Find the initial page structure
@@ -232,6 +231,7 @@ void usb_stor_set_xfer_buf(unsigned char *buffer,
232 unsigned int offset = 0; 231 unsigned int offset = 0;
233 struct scatterlist *sg = NULL; 232 struct scatterlist *sg = NULL;
234 233
234 buflen = min(buflen, scsi_bufflen(srb));
235 buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset, 235 buflen = usb_stor_access_xfer_buf(buffer, buflen, srb, &sg, &offset,
236 TO_XFER_BUF); 236 TO_XFER_BUF);
237 if (buflen < scsi_bufflen(srb)) 237 if (buflen < scsi_bufflen(srb))
diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
index d43a3415e12f..6d14327c921d 100644
--- a/drivers/usb/storage/sddr55.c
+++ b/drivers/usb/storage/sddr55.c
@@ -522,8 +522,8 @@ int sddr55_reset(struct us_data *us) {
522 522
523static unsigned long sddr55_get_capacity(struct us_data *us) { 523static unsigned long sddr55_get_capacity(struct us_data *us) {
524 524
525 unsigned char manufacturerID; 525 unsigned char uninitialized_var(manufacturerID);
526 unsigned char deviceID; 526 unsigned char uninitialized_var(deviceID);
527 int result; 527 int result;
528 struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra; 528 struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra;
529 529