On Tue Feb 18 16:05:50 2025 +0300, Dan Carpenter wrote:
> You can't pass uninitialized "ret" variables to cci_write(). It has to
> start as zero.
>
> Fixes: 4f0aeba4f155 ("media: i2c: imx214: Convert to CCI register access
> helpers")
> Signed-off-by: Dan Carpenter <[email protected]>
> Reviewed-by: André Apitzsch <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/i2c/imx214.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
index 4f320660c91c..dd7bc45523d8 100644
--- a/drivers/media/i2c/imx214.c
+++ b/drivers/media/i2c/imx214.c
@@ -795,7 +795,7 @@ static int imx214_set_ctrl(struct v4l2_ctrl *ctrl)
struct imx214, ctrls);
const struct v4l2_mbus_framefmt *format = NULL;
struct v4l2_subdev_state *state;
- int ret;
+ int ret = 0;
if (ctrl->id == V4L2_CID_VBLANK) {
int exposure_max, exposure_def;