From 77d8091ba1c5501de6c0f26601fdf544e4b70868 Mon Sep 17 00:00:00 2001 From: Konsta Date: Sun, 26 Nov 2023 20:11:11 +0200 Subject: [PATCH] cec: don't add port info if physical address is invalid * Fixes https://github.com/raspberry-vanilla/android_local_manifest/issues/37. --- cec/hdmi_cec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cec/hdmi_cec.c b/cec/hdmi_cec.c index 23ddcd3..bb9a1ba 100644 --- a/cec/hdmi_cec.c +++ b/cec/hdmi_cec.c @@ -248,8 +248,10 @@ static void hdmicec_get_port_info(const struct hdmi_cec_device *dev, ctx->port_info.arc_supported, ctx->port_info.physical_address); - *list = &ctx->port_info; - *total = 1; + if (ctx->port_info.physical_address != CEC_PHYS_ADDR_INVALID) { + *list = &ctx->port_info; + *total = 1; + } } static void hdmicec_set_option(const struct hdmi_cec_device *dev, int flag, int value)