diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2018-02-03 13:46:05 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-02-26 09:46:55 -0500 |
commit | fcab757396b29b72e76c66d0216c923094ff69fc (patch) | |
tree | 322ec503be6c47eb18d0682aa7983a3d6078b313 /drivers/media/media-device.c | |
parent | dfa2e02e011a239a160466e6bf794cb131790c0d (diff) |
media: media-device.c: zero reserved fields
MEDIA_IOC_SETUP_LINK didn't zero the reserved field of the media_link_desc
struct. Do so in media_device_setup_link().
MEDIA_IOC_ENUM_LINKS didn't zero the reserved field of the media_links_enum
struct. Do so in media_device_enum_links().
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/media-device.c')
-rw-r--r-- | drivers/media/media-device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index f44244415124..5d55743f970c 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -190,6 +190,7 @@ static long media_device_enum_links(struct media_device *mdev, ulink_desc++; } } + memset(links->reserved, 0, sizeof(links->reserved)); return 0; } @@ -218,6 +219,8 @@ static long media_device_setup_link(struct media_device *mdev, if (link == NULL) return -EINVAL; + memset(linkd->reserved, 0, sizeof(linkd->reserved)); + /* Setup the link on both entities. */ return __media_entity_setup_link(link, linkd->flags); } |