From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Fri, 14 Oct 2011 20:00:19 +0000 (-0300)
Subject: [media] cx23885: Don't use memset on vidioc_ callbacks
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d5492fb9ed3f3f25c56b25684072f0d234863b08;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git

[media] cx23885: Don't use memset on vidioc_ callbacks

vidioc_g_tuner should not do any memset for the parameters. Core
already does that. In particular, V4L2 core now does some handling
for the tuner type, and the tuner-core module relies on that.

So, doing any memset there is a very bad idea.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---

diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c
index acd6e0c2970e..34854b0a94a5 100644
--- a/drivers/media/video/cx23885/cx23885-video.c
+++ b/drivers/media/video/cx23885/cx23885-video.c
@@ -1223,7 +1223,6 @@ static int vidioc_g_tuner(struct file *file, void *priv,
 	if (0 != t->index)
 		return -EINVAL;
 
-	memset(t, 0, sizeof(*t));
 	strcpy(t->name, "Television");
 
 	return 0;