diff options
author | Salva Peiró <speiro@ai2.upv.es> | 2014-06-07 10:41:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-22 00:02:52 -0400 |
commit | f8ca6ac00d2ba24c5557f08f81439cd3432f0802 (patch) | |
tree | 2952f3b9d9531315c9985eed7d10d021ae4591b2 /drivers/media/media-device.c | |
parent | b225e398f622c5f5579fb4fd14f8bcb0f953e650 (diff) |
[media] media-device: Remove duplicated memset() in media_enum_entities()
After the zeroing the whole struct struct media_entity_desc u_ent,
it is no longer necessary to memset(0) its u_ent.name field.
CC: stable@vger.kernel.org
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/media-device.c')
-rw-r--r-- | drivers/media/media-device.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 88b97c9e64ac..73a432934bd8 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c | |||
@@ -106,8 +106,6 @@ static long media_device_enum_entities(struct media_device *mdev, | |||
106 | if (ent->name) { | 106 | if (ent->name) { |
107 | strncpy(u_ent.name, ent->name, sizeof(u_ent.name)); | 107 | strncpy(u_ent.name, ent->name, sizeof(u_ent.name)); |
108 | u_ent.name[sizeof(u_ent.name) - 1] = '\0'; | 108 | u_ent.name[sizeof(u_ent.name) - 1] = '\0'; |
109 | } else { | ||
110 | memset(u_ent.name, 0, sizeof(u_ent.name)); | ||
111 | } | 109 | } |
112 | u_ent.type = ent->type; | 110 | u_ent.type = ent->type; |
113 | u_ent.revision = ent->revision; | 111 | u_ent.revision = ent->revision; |