aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsifram.rajas@gmail.com <sifram.rajas@gmail.com>2011-09-02 14:06:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-09 18:52:54 -0400
commit73ddc2474bcc5234fa0a4e406e015ed16d16b6c8 (patch)
treef88ed812a1bf5bb659f4d13a88a7565f29081fbb
parent2ffdea25f054439c31c24b248faa647685280571 (diff)
xhci: Redundant check in xhci_check_args for xhci->devs
The xhci_hcd->devs is an array of pointers rather than pointer to pointer. Hence this check is not required. Signed-off-by: Sifram Rajas <Sifram Rajas sifram.rajas@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/host/xhci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 6440bd210c48..dd0dc15680b6 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -945,8 +945,7 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
945 return -ENODEV; 945 return -ENODEV;
946 946
947 if (check_virt_dev) { 947 if (check_virt_dev) {
948 if (!udev->slot_id || !xhci->devs 948 if (!udev->slot_id || !xhci->devs[udev->slot_id]) {
949 || !xhci->devs[udev->slot_id]) {
950 printk(KERN_DEBUG "xHCI %s called with unaddressed " 949 printk(KERN_DEBUG "xHCI %s called with unaddressed "
951 "device\n", func); 950 "device\n", func);
952 return -EINVAL; 951 return -EINVAL;