aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/apollolake/i2c.c')
-rw-r--r--src/soc/intel/apollolake/i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/intel/apollolake/i2c.c b/src/soc/intel/apollolake/i2c.c
index 2b6cbf95b2..4ae500ecce 100644
--- a/src/soc/intel/apollolake/i2c.c
+++ b/src/soc/intel/apollolake/i2c.c
@@ -44,7 +44,7 @@ uintptr_t i2c_get_soc_early_base(unsigned int bus)
/* Convert I2C bus number to PCI device and function */
int i2c_soc_bus_to_devfn(unsigned int bus)
{
- if (bus >= 0 && bus <= 3)
+ if (bus <= 3)
return PCI_DEVFN(PCH_DEV_SLOT_SIO1, bus);
else if (bus >= 4 && bus <= 7)
return PCI_DEVFN(PCH_DEV_SLOT_SIO2, (bus - 4));