Skip to contentSkip to conversation

am437x-vpfe: fix an uninitialized variable bug

PATCH In review Dan Carpenter 2 participants 2 messages Mar 15, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 am437x-vpfe: fix an uninitialized variable bug

If we are doing V4L2_FIELD_NONE then "ret" is used uninitialized.

Fixes 417d2e507edc ('[media] media: platform: add VPFE capture driver support for AM437X')
drivers/media/platform/am437x/am437x-vpfe.c +1 -1
index de32e3a..7d14732 100644
@@ -1047,7 +1047,7 @@ static int vpfe_get_ccdc_image_format(struct vpfe_device *vpfe,
 static int vpfe_config_ccdc_image_format(struct vpfe_device *vpfe)
 {
 	enum ccdc_frmfmt frm_fmt = CCDC_FRMFMT_INTERLACED;
-	int ret;
+	int ret = 0;
 
 	vpfe_dbg(2, vpfe, "vpfe_config_ccdc_image_format\n");