diff mbox

[media] am437x-vpfe: fix an uninitialized variable bug

Message ID 20160315070412.GA13560@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter March 15, 2016, 7:04 a.m. UTC
If we are doing V4L2_FIELD_NONE then "ret" is used uninitialized.

Fixes: 417d2e507edc ('[media] media: platform: add VPFE capture driver support for AM437X')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Lad, Prabhakar March 15, 2016, 6:28 p.m. UTC | #1
Hi Dan,

Thanks for the patch.

On Tue, Mar 15, 2016 at 7:04 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> If we are doing V4L2_FIELD_NONE then "ret" is used uninitialized.
>
> Fixes: 417d2e507edc ('[media] media: platform: add VPFE capture driver support for AM437X')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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");