[media] media-device: Remove duplicated memset() in media_enum_entities()
authorSalva Peiró <speiro@ai2.upv.es>
Sat, 7 Jun 2014 14:41:44 +0000 (11:41 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 22 Jul 2014 04:02:52 +0000 (01:02 -0300)
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>
drivers/media/media-device.c

index 88b97c9e64acb649ee646832daaf63f04101cc16..73a432934bd8d1ee8bad5c2e07689cca9ed1a1d3 100644 (file)
@@ -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;