[PATCH 4/5] i2c: of: remove duplicated check for valid address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The very same check is done when calling i2c_new_device(). Remove it
here to avoid code duplication.

Signed-off-by: Wolfram Sang <wsa@xxxxxxxxxxxxx>
---
 drivers/i2c/i2c-core-of.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c
index 4b573ee4a8203a..bbfff3f61b1fdb 100644
--- a/drivers/i2c/i2c-core-of.c
+++ b/drivers/i2c/i2c-core-of.c
@@ -57,12 +57,6 @@ static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap,
 		info.flags |= I2C_CLIENT_SLAVE;
 	}
 
-	if (i2c_check_addr_validity(addr, info.flags)) {
-		dev_err(&adap->dev, "of_i2c: invalid addr=%x on %pOF\n",
-			addr, node);
-		return ERR_PTR(-EINVAL);
-	}
-
 	info.addr = addr;
 	info.archdata = &dev_ad;
 	info.of_node = of_node_get(node);
-- 
2.11.0




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux