media: i2c: rdacm21: Fix uninitialized value
[ Upstream commit33c7ae8f49
] Fix the following smatch warning: drivers/media/i2c/rdacm21.c:373 ov10640_check_id() error: uninitialized symbol 'val'. Initialize 'val' to 0 in the ov10640_check_id() function. Fixes:2b821698dc
("media: i2c: rdacm21: Power up OV10640 before OV490") Reported-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
86a41ad012
commit
3a2cf76cfb
|
@ -351,7 +351,7 @@ static void ov10640_power_up(struct rdacm21_device *dev)
|
|||
static int ov10640_check_id(struct rdacm21_device *dev)
|
||||
{
|
||||
unsigned int i;
|
||||
u8 val;
|
||||
u8 val = 0;
|
||||
|
||||
/* Read OV10640 ID to test communications. */
|
||||
for (i = 0; i < OV10640_PID_TIMEOUT; ++i) {
|
||||
|
|
Loading…
Reference in New Issue