Skip to contentSkip to conversation

media: i2c: isl7998x: inline i2c_check_functionality check

PATCH RESEND In review Thorsten Blum 1 participant 2 messages Jun 2 – Jun 30

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 media: i2c: isl7998x: inline i2c_check_functionality check

Inline the i2c_check_functionality() check, since the function returns a boolean status rather than an error code.

---
 drivers/media/i2c/isl7998x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/i2c/isl7998x.c +1 -2
index a77538d2343c..8244d4296a02 100644
@@ -1460,8 +1460,7 @@ static int isl7998x_probe(struct i2c_client *client)
 	int nr_inputs;
 	int ret;
 
-	ret = i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA);
-	if (!ret) {
+	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA)) {
 		dev_warn(&adapter->dev,
 			 "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n");
 		return -EIO;
#1 lore raw

Gentle ping?

Quoted 23 lines · Thorsten Blum

Inline the i2c_check_functionality() check, since the function returns a boolean status rather than an error code.

---
 drivers/media/i2c/isl7998x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/i2c/isl7998x.c +1 -2
index a77538d2343c..8244d4296a02 100644
@@ -1460,8 +1460,7 @@ static int isl7998x_probe(struct i2c_client *client)
 	int nr_inputs;
 	int ret;
 
-	ret = i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA);
-	if (!ret) {
+	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA)) {
 		dev_warn(&adapter->dev,
 			 "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n");
 		return -EIO;