[PATCH] [media] media: am437x-vpfe: ensure ret is initialized
From: Colin King
Date: Mon Mar 21 2016 - 19:32:34 EST
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
ret should be initialized to 0; for example if pfe->fmt.fmt.pix.field
is V4L2_FIELD_NONE then ret will contain garbage from the
uninitialized state causing garbage to be returned if it is non-zero.
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
drivers/media/platform/am437x/am437x-vpfe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c
index de32e3a..7d14732 100644
--- a/drivers/media/platform/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/am437x/am437x-vpfe.c
@@ -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");
--
2.7.3