Skip to content

Commit 7266eb7

Browse files
paulkocialkowskimchehab
authored andcommitted
media: sun6i-isp: capture: Fix uninitialized variable use
While the stride_chroma variable was previously initialized to zero, it's actually stride_chroma_div4 that is set to hardware registers. Initialize it to zero instead to avoid an uninitialized variable use and get rid of the associated smatch warning. Signed-off-by: Paul Kocialkowski <[email protected]> Fixes: e3185e1 ("media: staging: media: Add support for the Allwinner A31 ISP") Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 44723b8 commit 7266eb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ sun6i_isp_capture_buffer_configure(struct sun6i_isp_device *isp_dev,
108108
void sun6i_isp_capture_configure(struct sun6i_isp_device *isp_dev)
109109
{
110110
unsigned int width, height;
111-
unsigned int stride_luma, stride_chroma = 0;
112-
unsigned int stride_luma_div4, stride_chroma_div4;
111+
unsigned int stride_luma, stride_chroma;
112+
unsigned int stride_luma_div4, stride_chroma_div4 = 0;
113113
const struct sun6i_isp_capture_format *format;
114114
const struct v4l2_format_info *info;
115115
u32 pixelformat;

0 commit comments

Comments
 (0)