Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73ddc247 authored by sifram.rajas@gmail.com's avatar sifram.rajas@gmail.com Committed by Greg Kroah-Hartman
Browse files

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: default avatarSifram Rajas &lt;Sifram Rajas <sifram.rajas@gmail.com>
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2ffdea25
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;