* [PATCH] [media] media: am437x-vpfe: ensure ret is initialized
@ 2016-03-21 23:32 Colin King
2016-03-22 11:25 ` Lad, Prabhakar
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2016-03-21 23:32 UTC (permalink / raw)
To: prabhakar.csengg, Mauro Carvalho Chehab, linux-media; +Cc: linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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@canonical.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [media] media: am437x-vpfe: ensure ret is initialized
2016-03-21 23:32 [PATCH] [media] media: am437x-vpfe: ensure ret is initialized Colin King
@ 2016-03-22 11:25 ` Lad, Prabhakar
0 siblings, 0 replies; 2+ messages in thread
From: Lad, Prabhakar @ 2016-03-22 11:25 UTC (permalink / raw)
To: Colin King; +Cc: Mauro Carvalho Chehab, linux-media, LKML
Hi Colin,
On Mon, Mar 21, 2016 at 11:32 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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.
>
Thanks for the patch, patch [1] fixing this issue is already posted in ML.
[1] http://www.mail-archive.com/linux-media@vger.kernel.org/msg95562.html
Cheers,
--Prabhakar Lad
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-22 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 23:32 [PATCH] [media] media: am437x-vpfe: ensure ret is initialized Colin King
2016-03-22 11:25 ` Lad, Prabhakar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).