From: sifram.rajas@gmail.com Date: Fri, 2 Sep 2011 18:06:00 +0000 (-0700) Subject: xhci: Redundant check in xhci_check_args for xhci->devs X-Git-Tag: firefly_0821_release~3680^2~4327^2~167 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=73ddc2474bcc5234fa0a4e406e015ed16d16b6c8;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman --- 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, return -ENODEV; if (check_virt_dev) { - if (!udev->slot_id || !xhci->devs - || !xhci->devs[udev->slot_id]) { + if (!udev->slot_id || !xhci->devs[udev->slot_id]) { printk(KERN_DEBUG "xHCI %s called with unaddressed " "device\n", func); return -EINVAL;