]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - 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
CommitLineData
fc58cd71
GKH
1From f8ca6ac00d2ba24c5557f08f81439cd3432f0802 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Salva=20Peir=C3=B3?= <speiro@ai2.upv.es>
3Date: Sat, 7 Jun 2014 11:41:44 -0300
4Subject: media: media-device: Remove duplicated memset() in media_enum_entities()
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9From: Salva Peiró <speiro@ai2.upv.es>
10
11commit f8ca6ac00d2ba24c5557f08f81439cd3432f0802 upstream.
12
13After the zeroing the whole struct struct media_entity_desc u_ent,
14it is no longer necessary to memset(0) its u_ent.name field.
15
16Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
17Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
18Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
19Signed-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;