lpc17_40: Fixed I2C port sanity check.

This commit is contained in:
Fotis Panagiotopoulos
2021-08-10 17:45:38 +03:00
committed by Xiang Xiao
parent 2b3106fb47
commit 5b7ff03f40
+1 -6
View File
@@ -516,12 +516,6 @@ struct i2c_master_s *lpc17_40_i2cbus_initialize(int port)
{
struct lpc17_40_i2cdev_s *priv;
if (port > 1)
{
i2cerr("ERROR: LPC I2C Only supports ports 0 and 1\n");
return NULL;
}
irqstate_t flags;
uint32_t regval;
@@ -615,6 +609,7 @@ struct i2c_master_s *lpc17_40_i2cbus_initialize(int port)
else
#endif
{
i2cerr("ERROR: LPC I2C Only supports ports 0, 1 and 2\n");
return NULL;
}