On Wed Apr 30 11:27:30 2025 +0300, Dan Carpenter wrote:
> The "ret" variable is not initialized on the success path. Set it to
> zero.
>
> Fixes: 7b19b0fc8ac8 ("media: i2c: imx334: Convert to CCI register access
> helpers")
> Cc: [email protected]
> Signed-off-by: Dan Carpenter <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/i2c/imx334.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
index fc875072f859..846b9928d4e8 100644
--- a/drivers/media/i2c/imx334.c
+++ b/drivers/media/i2c/imx334.c
@@ -536,7 +536,8 @@ static int imx334_update_controls(struct imx334 *imx334,
static int imx334_update_exp_gain(struct imx334 *imx334, u32 exposure, u32
gain)
{
u32 lpfr, shutter;
- int ret, ret_hold;
+ int ret_hold;
+ int ret = 0;
lpfr = imx334->vblank + imx334->cur_mode->height;
shutter = lpfr - exposure;