]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.16.3/media-media-device-remove-duplicated-memset-in-media_enum_entities.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.16.3 / media-media-device-remove-duplicated-memset-in-media_enum_entities.patch
1 From f8ca6ac00d2ba24c5557f08f81439cd3432f0802 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Salva=20Peir=C3=B3?= <speiro@ai2.upv.es>
3 Date: Sat, 7 Jun 2014 11:41:44 -0300
4 Subject: media: media-device: Remove duplicated memset() in media_enum_entities()
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 From: Salva Peiró <speiro@ai2.upv.es>
10
11 commit f8ca6ac00d2ba24c5557f08f81439cd3432f0802 upstream.
12
13 After the zeroing the whole struct struct media_entity_desc u_ent,
14 it is no longer necessary to memset(0) its u_ent.name field.
15
16 Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
17 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
18 Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21 ---
22 drivers/media/media-device.c | 2 --
23 1 file changed, 2 deletions(-)
24
25 --- a/drivers/media/media-device.c
26 +++ b/drivers/media/media-device.c
27 @@ -106,8 +106,6 @@ static long media_device_enum_entities(s
28 if (ent->name) {
29 strncpy(u_ent.name, ent->name, sizeof(u_ent.name));
30 u_ent.name[sizeof(u_ent.name) - 1] = '\0';
31 - } else {
32 - memset(u_ent.name, 0, sizeof(u_ent.name));
33 }
34 u_ent.type = ent->type;
35 u_ent.revision = ent->revision;