[PATCH v2 07/16] video: vpl: fix potential read of uninitialized variable

Ahmad Fatoum a.fatoum at barebox.org
Thu Jun 5 22:57:39 PDT 2025


remote_port_id is passed to the ioctl callback, so make sure it has a
value if the endpoint has no reg property.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 drivers/video/vpl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/vpl.c b/drivers/video/vpl.c
index 35fb342a8f25..6fcba0901165 100644
--- a/drivers/video/vpl.c
+++ b/drivers/video/vpl.c
@@ -70,7 +70,7 @@ int vpl_ioctl(struct vpl *vpl, unsigned int port,
 	for_each_child_of_node(node, endpoint) {
 		struct device_node *remote, *remote_parent;
 		struct vpl *remote_vpl;
-		u32 remote_port_id;
+		u32 remote_port_id = 0;
 
 		remote = of_graph_get_remote_port(endpoint);
 		if (!remote) {
-- 
2.39.5




More information about the barebox mailing list