Skip to content

Commit

Permalink
xhci: Redundant check in xhci_check_args for xhci->devs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sifram.rajas@gmail.com authored and Greg Kroah-Hartman committed Sep 9, 2011
1 parent 2ffdea2 commit 73ddc24
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 73ddc24

Please sign in to comment.