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>
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;