diff options
author | Tom Rini <trini@konsulko.com> | 2015-10-11 14:26:27 +0300 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-11-03 19:29:33 +0300 |
commit | f5fb78a2748af0d532110cc4f03912b6b30f8761 (patch) | |
tree | 7ef34f4fd1d4c7e11cf2e4fc63758c68baa88a6d | |
parent | 96d59e9d6aa74e35c63dc74da10e41f8ba0f6de4 (diff) | |
download | u-boot-f5fb78a2748af0d532110cc4f03912b6b30f8761.tar.xz |
common/usb_storage.c: Clean up usb_storage_probe()
We have the protocol and subclass variables which are used only in
disabled debug code. This code dates back to the initial git import and
seemingly dead code so remove it.
This was detected by Coverity (CID 131117)
Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r-- | common/usb_storage.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c index 0ccaeb4a14..4fa6538db5 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1177,25 +1177,9 @@ int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, struct usb_endpoint_descriptor *ep_desc; unsigned int flags = 0; - int protocol = 0; - int subclass = 0; - /* let's examine the device now */ iface = &dev->config.if_desc[ifnum]; -#if 0 - /* this is the place to patch some storage devices */ - debug("iVendor %X iProduct %X\n", dev->descriptor.idVendor, - dev->descriptor.idProduct); - - if ((dev->descriptor.idVendor) == 0x066b && - (dev->descriptor.idProduct) == 0x0103) { - debug("patched for E-USB\n"); - protocol = US_PR_CB; - subclass = US_SC_UFI; /* an assumption */ - } -#endif - if (dev->descriptor.bDeviceClass != 0 || iface->desc.bInterfaceClass != USB_CLASS_MASS_STORAGE || iface->desc.bInterfaceSubClass < US_SC_MIN || @@ -1215,17 +1199,8 @@ int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, ss->ifnum = ifnum; ss->pusb_dev = dev; ss->attention_done = 0; - - /* If the device has subclass and protocol, then use that. Otherwise, - * take data from the specific interface. - */ - if (subclass) { - ss->subclass = subclass; - ss->protocol = protocol; - } else { - ss->subclass = iface->desc.bInterfaceSubClass; - ss->protocol = iface->desc.bInterfaceProtocol; - } + ss->subclass = iface->desc.bInterfaceSubClass; + ss->protocol = iface->desc.bInterfaceProtocol; /* set the handler pointers based on the protocol */ debug("Transport: "); |