summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorJeroen Hofstee <jeroen@myspectrum.nl>2014-06-11 22:31:27 (GMT)
committerMarek Vasut <marex@denx.de>2014-06-25 20:43:16 (GMT)
commit25d1936a192ac62b8df5dc33e37455dcaeb19fae (patch)
tree88f55ecdd0b7002bc1b63566b34df9f78340fcf3 /drivers/usb/host/xhci.c
parent19a2a67fa27ac5bf50808bbded5c19279c7d86e5 (diff)
downloadu-boot-25d1936a192ac62b8df5dc33e37455dcaeb19fae.tar.xz
usb: xhci: (likely) fix bracket in if condition
Because of the brackets the & and && is evaluated before the comparison. This is likely not the intention. Change it to test the first and second condition to both be true. cc: Marek Vasut <marex@denx.de> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index d1c2e5c..59dc096 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -643,8 +643,8 @@ static int xhci_submit_root(struct usb_device *udev, unsigned long pipe,
struct xhci_ctrl *ctrl = udev->controller;
struct xhci_hcor *hcor = ctrl->hcor;
- if (((req->requesttype & USB_RT_PORT) &&
- le16_to_cpu(req->index)) > CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS) {
+ if ((req->requesttype & USB_RT_PORT) &&
+ le16_to_cpu(req->index) > CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS) {
printf("The request port(%d) is not configured\n",
le16_to_cpu(req->index) - 1);
return -EINVAL;