From: Salva Peiró Date: Sat, 7 Jun 2014 14:41:44 +0000 (-0300) Subject: media: media-device: Remove duplicated memset() in media_enum_entities() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=01d29ff71d3b123c443f8426d5540462e9d04b19;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git media: media-device: Remove duplicated memset() in media_enum_entities() commit f8ca6ac00d2ba24c5557f08f81439cd3432f0802 upstream. 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. Signed-off-by: Salva Peiró Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 79715f9feb0..fdb5840f034 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, 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;