]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/usb_storage.c
USB storage probe
[people/ms/u-boot.git] / common / usb_storage.c
index 239bddc5118d5238f9e8205123742ab2a127ee84..4fc01a22b4d4e5c95adfb81c8274baf2016f638b 100644 (file)
@@ -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");