aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSalva Peiró <[email protected]>2014-06-07 14:41:44 +0000
committerMauro Carvalho Chehab <[email protected]>2014-07-22 04:02:52 +0000
commitf8ca6ac00d2ba24c5557f08f81439cd3432f0802 (patch)
tree2952f3b9d9531315c9985eed7d10d021ae4591b2
parent[media] v4l: subdev: Unify argument validation across IOCTLs (diff)
downloadkernel-f8ca6ac00d2ba24c5557f08f81439cd3432f0802.tar.gz
kernel-f8ca6ac00d2ba24c5557f08f81439cd3432f0802.zip
[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: [email protected] Signed-off-by: Salva Peiró <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-rw-r--r--drivers/media/media-device.c2
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,
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;