Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit baa9e910 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

media: zero reservedX fields in media_v2_topology



The MEDIA_IOC_G_TOPOLOGY implementation did not zero the reservedX fields.
Fix this.

Found with v4l2-compliance.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 81e0989e
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -266,6 +266,7 @@ static long media_device_get_topology(struct media_device *mdev,
		uentity++;
		uentity++;
	}
	}
	topo->num_entities = i;
	topo->num_entities = i;
	topo->reserved1 = 0;


	/* Get interfaces and number of interfaces */
	/* Get interfaces and number of interfaces */
	i = 0;
	i = 0;
@@ -301,6 +302,7 @@ static long media_device_get_topology(struct media_device *mdev,
		uintf++;
		uintf++;
	}
	}
	topo->num_interfaces = i;
	topo->num_interfaces = i;
	topo->reserved2 = 0;


	/* Get pads and number of pads */
	/* Get pads and number of pads */
	i = 0;
	i = 0;
@@ -327,6 +329,7 @@ static long media_device_get_topology(struct media_device *mdev,
		upad++;
		upad++;
	}
	}
	topo->num_pads = i;
	topo->num_pads = i;
	topo->reserved3 = 0;


	/* Get links and number of links */
	/* Get links and number of links */
	i = 0;
	i = 0;
@@ -358,6 +361,7 @@ static long media_device_get_topology(struct media_device *mdev,
		ulink++;
		ulink++;
	}
	}
	topo->num_links = i;
	topo->num_links = i;
	topo->reserved4 = 0;


	return ret;
	return ret;
}
}