[PATCH 30/35] media: i2c: et8ek8: Refator return path
Ricardo Ribalda
ribalda at chromium.org
Mon Apr 15 12:34:47 PDT 2024
This is a nop, but let cocci now that this is not a good candidate for
min()
drivers/media/i2c/et8ek8/et8ek8_driver.c:255:13-14: WARNING opportunity for min()
Signed-off-by: Ricardo Ribalda <ribalda at chromium.org>
---
drivers/media/i2c/et8ek8/et8ek8_driver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/et8ek8/et8ek8_driver.c b/drivers/media/i2c/et8ek8/et8ek8_driver.c
index e932d25ca7b3..c7984f90ae4d 100644
--- a/drivers/media/i2c/et8ek8/et8ek8_driver.c
+++ b/drivers/media/i2c/et8ek8/et8ek8_driver.c
@@ -252,7 +252,9 @@ static int et8ek8_i2c_buffered_write_regs(struct i2c_client *client,
rval = i2c_transfer(client->adapter, msg, wcnt);
- return rval < 0 ? rval : 0;
+ if (rval < 0)
+ return rval;
+ return 0;
}
/*
--
2.44.0.683.g7961c838ac-goog
More information about the linux-arm-kernel
mailing list