diff options
Diffstat (limited to 'common/usb_storage.c')
-rw-r--r-- | common/usb_storage.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c index a8642c9..4fc01a2 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -175,7 +175,7 @@ void uhci_show_temp_int_td(void); block_dev_desc_t *usb_stor_get_dev(int index) { - return (index < USB_MAX_STOR_DEV) ? &usb_dev_desc[index] : NULL; + return (index < usb_max_devs) ? &usb_dev_desc[index] : NULL; } @@ -244,7 +244,7 @@ int usb_stor_scan(int mode) * get info and fill it in */ if (usb_stor_get_info(dev, &usb_stor[usb_max_devs], - &usb_dev_desc[usb_max_devs])) + &usb_dev_desc[usb_max_devs]) == 1) usb_max_devs++; } /* if storage device */ @@ -888,7 +888,7 @@ static int usb_inquiry(ccb *srb, struct us_data *ss) USB_STOR_PRINTF("inquiry returns %d\n", i); if (i == 0) break; - } while (retry--); + } while (--retry); if (!retry) { printf("error in inquiry\n"); |