Zero the reserved field of struct media_links_enum. Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> Reported-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> --- diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index afbf23a19e16..7af6fadd206d 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -155,6 +155,8 @@ static long media_device_enum_links(struct media_device *mdev, if (entity == NULL) return -EINVAL; + memset(links->reserved, 0, sizeof(links->reserved)); + if (links->pads) { unsigned int p;