summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/pci_endpoint/pci_ep-uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci_endpoint/pci_ep-uclass.c b/drivers/pci_endpoint/pci_ep-uclass.c
index 2f9c70398d..9f53a9a9b9 100644
--- a/drivers/pci_endpoint/pci_ep-uclass.c
+++ b/drivers/pci_endpoint/pci_ep-uclass.c
@@ -43,7 +43,7 @@ int pci_ep_set_bar(struct udevice *dev, uint func_no, struct pci_bar *ep_bar)
int flags = ep_bar->flags;
/* Some basic bar validity checks */
- if (ep_bar->barno > BAR_5 || ep_bar < BAR_0)
+ if (ep_bar->barno > BAR_5 || ep_bar->barno < BAR_0)
return -EINVAL;
if ((ep_bar->barno == BAR_5 &&