[PATCH 2/2] ASoC: SDCA: Check return value on a missing FDL_Set_Index Range

From: Maciej Strozek

Date: Thu Sep 17 2026 - 06:47:32 EST


In case of a missing FDL_Set_Index control the return value can be NULL,
ensure the functions returns before passing it on to range search.

Fixes: 71f7990a34cd ("ASoC: SDCA: Add FDL library for XU entities")
Signed-off-by: Maciej Strozek <mstrozek@xxxxxxxxxxxxxxxxxxxxx>
---
sound/soc/sdca/sdca_fdl.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/sound/soc/sdca/sdca_fdl.c b/sound/soc/sdca/sdca_fdl.c
index e08a553e0eab0..7fc809707944d 100644
--- a/sound/soc/sdca/sdca_fdl.c
+++ b/sound/soc/sdca/sdca_fdl.c
@@ -301,6 +301,8 @@ static struct sdca_fdl_set *fdl_get_set(struct sdca_interrupt *interrupt)

range = sdca_selector_find_range(dev, xu, SDCA_CTL_XU_FDL_SET_INDEX,
SDCA_FDL_SET_INDEX_NCOLS, 0);
+ if (!range)
+ return NULL;

val = sdca_range_search(range, SDCA_FDL_SET_INDEX_SET_NUMBER,
val, SDCA_FDL_SET_INDEX_FILE_SET_ID);
--
2.47.3