]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/usb_storage.c
* Fix SDRAM timings for LITE5200 / IceCube board
[karo-tx-uboot.git] / common / usb_storage.c
index dbe9cd9b8e7d0ad1d02edbc6dec0b6dac1d47ab8..fd116be86acf646c04f9c3948a483dafffeff64b 100644 (file)
@@ -899,8 +899,12 @@ unsigned long usb_stor_read(int device, unsigned long blknr, unsigned long blkcn
        unsigned short smallblks;
        struct usb_device *dev;
        int retry,i;
-       ccb *srb=&usb_ccb;
-       device&=0xff;
+       ccb *srb = &usb_ccb;
+
+       if (blkcnt == 0)
+               return 0;
+
+       device &= 0xff;
        /* Setup  device
         */
        USB_STOR_PRINTF("\nusb_read: dev %d \n",device);