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