diff options
author | Ramon Fried | 2019-07-31 11:04:26 +0300 |
---|---|---|
committer | Tom Rini | 2019-08-07 15:31:04 -0400 |
commit | 6948f1023f3aa382bb023f115929ab3106edb7ee (patch) | |
tree | 8ce590165e09c5f87488b7b2bf31eade84a76f23 /drivers/pci_endpoint/pci_ep-uclass.c | |
parent | 2d88b5a38eda720b028818c039e08b8d6dea6cc6 (diff) |
pci_ep: Fix Coverity warning
Fix the following Coverity warning:
CID 244086: Incorrect expression (BAD_COMPARE)
Comparing pointer "ep_bar" against NULL using anything besides == or
is likely to be incorrect.
Fixes: 914026d25848 ("drivers: pci_ep: Introduce UCLASS_PCI_EP uclass")
Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'drivers/pci_endpoint/pci_ep-uclass.c')
-rw-r--r-- | drivers/pci_endpoint/pci_ep-uclass.c | 2 |
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 2f9c70398d7..9f53a9a9b97 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 && |