[media] cx23885: Don't use memset on vidioc_ callbacks
authorMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 14 Oct 2011 20:00:19 +0000 (17:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 14 Oct 2011 20:00:19 +0000 (17:00 -0300)
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>
drivers/media/video/cx23885/cx23885-video.c

index acd6e0c2970e64368bd1e101c8db365e1e306469..34854b0a94a56e2095d3c94fc2f429fe0c184f5f 100644 (file)
@@ -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;