Skip to content

Commit

Permalink
[media] media-device: Remove duplicated memset() in media_enum_entiti…
Browse files Browse the repository at this point in the history
…es()

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>
  • Loading branch information
Salva Peiró authored and Mauro Carvalho Chehab committed Jul 22, 2014
1 parent b225e39 commit f8ca6ac
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/media/media-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ static long media_device_enum_entities(struct media_device *mdev,
if (ent->name) {
strncpy(u_ent.name, ent->name, sizeof(u_ent.name));
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.revision = ent->revision;
Expand Down

0 comments on commit f8ca6ac

Please sign in to comment.