Skip to content

Commit 33c7ae8

Browse files
Jacopo Mondimchehab
authored andcommitted
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: 2b82169 ("media: i2c: rdacm21: Power up OV10640 before OV490") Reported-by: Hans Verkuil <[email protected]> Signed-off-by: Jacopo Mondi <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 7c8192e commit 33c7ae8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/media/i2c/rdacm21.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static void ov10640_power_up(struct rdacm21_device *dev)
351351
static int ov10640_check_id(struct rdacm21_device *dev)
352352
{
353353
unsigned int i;
354-
u8 val;
354+
u8 val = 0;
355355

356356
/* Read OV10640 ID to test communications. */
357357
for (i = 0; i < OV10640_PID_TIMEOUT; ++i) {

0 commit comments

Comments
 (0)