Commit f8ca6ac0 authored by Salva Peiró's avatar Salva Peiró Committed by Mauro Carvalho Chehab

[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: default avatarSalva Peiró <speiro@ai2.upv.es>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent b225e398
...@@ -106,8 +106,6 @@ static long media_device_enum_entities(struct media_device *mdev, ...@@ -106,8 +106,6 @@ static long media_device_enum_entities(struct media_device *mdev,
if (ent->name) { if (ent->name) {
strncpy(u_ent.name, ent->name, sizeof(u_ent.name)); strncpy(u_ent.name, ent->name, sizeof(u_ent.name));
u_ent.name[sizeof(u_ent.name) - 1] = '\0'; u_ent.name[sizeof(u_ent.name) - 1] = '\0';
} else {
memset(u_ent.name, 0, sizeof(u_ent.name));
} }
u_ent.type = ent->type; u_ent.type = ent->type;
u_ent.revision = ent->revision; u_ent.revision = ent->revision;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment