[media] zoran: remove unnecessary memset

This change “[media] zoran: remove unnecessary memset” in Linux kernel is authored by Hans Verkuil <hans.verkuil [at] cisco.com> on Mon Jul 20 10:18:18 2015 -0300.

[media] zoran: remove unnecessary memset

There is no need to zero the v4l2_capability struct, the v4l2 core has done
that already.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 160d757.

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/media/pci/zoran/zoran_driver.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c
index 2b25d31..25cd18b 100644
--- a/drivers/media/pci/zoran/zoran_driver.c
+++ b/drivers/media/pci/zoran/zoran_driver.c
@@ -1523,7 +1523,6 @@ static int zoran_querycap(struct file *file, void *__fh, struct v4l2_capability
 	struct zoran_fh *fh = __fh;
 	struct zoran *zr = fh->zr;
 
-	memset(cap, 0, sizeof(*cap));
 	strncpy(cap->card, ZR_DEVNAME(zr), sizeof(cap->card)-1);
 	strncpy(cap->driver, "zoran", sizeof(cap->driver)-1);
 	snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s",

The commit for this change in Linux stable tree is 160d757 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *