mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-09 16:01:31 +00:00
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>
This commit is contained in:
parent
19a2a67fa2
commit
25d1936a19
1 changed files with 2 additions and 2 deletions
|
@ -643,8 +643,8 @@ static int xhci_submit_root(struct usb_device *udev, unsigned long pipe,
|
||||||
struct xhci_ctrl *ctrl = udev->controller;
|
struct xhci_ctrl *ctrl = udev->controller;
|
||||||
struct xhci_hcor *hcor = ctrl->hcor;
|
struct xhci_hcor *hcor = ctrl->hcor;
|
||||||
|
|
||||||
if (((req->requesttype & USB_RT_PORT) &&
|
if ((req->requesttype & USB_RT_PORT) &&
|
||||||
le16_to_cpu(req->index)) > CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS) {
|
le16_to_cpu(req->index) > CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS) {
|
||||||
printf("The request port(%d) is not configured\n",
|
printf("The request port(%d) is not configured\n",
|
||||||
le16_to_cpu(req->index) - 1);
|
le16_to_cpu(req->index) - 1);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue