Skip to content

Commit 73ddc24

Browse files
sifram.rajas@gmail.comgregkh
authored andcommitted
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>
1 parent 2ffdea2 commit 73ddc24

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/usb/host/xhci.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -945,8 +945,7 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
945945
return -ENODEV;
946946

947947
if (check_virt_dev) {
948-
if (!udev->slot_id || !xhci->devs
949-
|| !xhci->devs[udev->slot_id]) {
948+
if (!udev->slot_id || !xhci->devs[udev->slot_id]) {
950949
printk(KERN_DEBUG "xHCI %s called with unaddressed "
951950
"device\n", func);
952951
return -EINVAL;

0 commit comments

Comments
 (0)