tvp7002.c: In function 'tvp7002_g_register': tvp7002.c:691:11: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized] 691 | reg->val = val; | ~~~~~~~~~^~~~~ Just initialize val to 0. Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx> --- drivers/media/i2c/tvp7002.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c index de313b1306da..61f0804e8d65 100644 --- a/drivers/media/i2c/tvp7002.c +++ b/drivers/media/i2c/tvp7002.c @@ -684,7 +684,7 @@ static int tvp7002_query_dv_timings(struct v4l2_subdev *sd, static int tvp7002_g_register(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg) { - u8 val; + u8 val = 0; int ret; ret = tvp7002_read(sd, reg->reg & 0xff, &val); -- 2.28.0