[PATCH RESEND] media: i2c: isl7998x: Inline i2c_check_functionality() check

Thorsten Blum posted 1 patch 2 weeks, 2 days ago
drivers/media/i2c/isl7998x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH RESEND] media: i2c: isl7998x: Inline i2c_check_functionality() check
Posted by Thorsten Blum 2 weeks, 2 days ago
Inline the i2c_check_functionality() check, since the function returns a
boolean status rather than an error code.

Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 drivers/media/i2c/isl7998x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/i2c/isl7998x.c b/drivers/media/i2c/isl7998x.c
index a77538d2343c..8244d4296a02 100644
--- a/drivers/media/i2c/isl7998x.c
+++ b/drivers/media/i2c/isl7998x.c
@@ -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;
Re: [PATCH RESEND] media: i2c: isl7998x: Inline i2c_check_functionality() check
Posted by Thorsten Blum 2 weeks, 2 days ago
On Wed, Sep 09, 2026 at 09:50:33AM +0200, Thorsten Blum wrote:
> Inline the i2c_check_functionality() check, since the function returns a
> boolean status rather than an error code.
> 
> Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>
> Signed-off-by: Thorsten Blum <blum@kernel.org>
> ---
>  drivers/media/i2c/isl7998x.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

I just sent this to Wolfram directly as part of a small series [1] for
him to apply. Please ignore this earlier resend from today.

[1] https://lore.kernel.org/r/20260909082053.410739-4-blum@kernel.org/