Skip to content

Commit 6970888

Browse files
hverkuilmchehab
authored andcommitted
media: staging: media: imx: initialize hs_settle to avoid warning
Initialize hs_settle to 0 to avoid this compiler warning: imx8mq-mipi-csi2.c: In function 'imx8mq_mipi_csi_start_stream.part.0': imx8mq-mipi-csi2.c:91:55: warning: 'hs_settle' may be used uninitialized [-Wmaybe-uninitialized] 91 | #define GPR_CSI2_1_S_PRG_RXHS_SETTLE(x) (((x) & 0x3f) << 2) | ^~ imx8mq-mipi-csi2.c:357:13: note: 'hs_settle' was declared here 357 | u32 hs_settle; | ^~~~~~~~~ It's a false positive, but it is too complicated for the compiler to detect that. Signed-off-by: Hans Verkuil <[email protected]> Reviewed-by: Martin Kepplinger <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 3a4cdef commit 6970888

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/media/imx/imx8mq-mipi-csi2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ static int imx8mq_mipi_csi_start_stream(struct csi_state *state,
354354
struct v4l2_subdev_state *sd_state)
355355
{
356356
int ret;
357-
u32 hs_settle;
357+
u32 hs_settle = 0;
358358

359359
ret = imx8mq_mipi_csi_sw_reset(state);
360360
if (ret)

0 commit comments

Comments
 (0)