media: i2c: rdacm21: Fix uninitialized value
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: 2b821698dc73 ("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>
This commit is contained in:
parent
7c8192e8b4
commit
33c7ae8f49
@ -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…
x
Reference in New Issue
Block a user