From: Charles Keepax Date: Fri, 21 Mar 2025 13:53:24 +0000 (+0000) Subject: ASoC: SDCA: Correct handling of selected mode DisCo property X-Git-Tag: v6.15-rc1~173^2~4^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ef52d529bb75071e03cf85078f724d69c4abe89;p=thirdparty%2Fkernel%2Flinux.git ASoC: SDCA: Correct handling of selected mode DisCo property mipi-sdca-ge-selectedmode-controls-affected is actually required by the specification so the code should return an error if it is missing. Reported-by: Maciej Strozek Fixes: 13fe7497af19 ("ASoC: SDCA: Add support for GE Entity properties") Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20250321135324.380237-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c index c8efdc5301b53..493f390f087ad 100644 --- a/sound/soc/sdca/sdca_functions.c +++ b/sound/soc/sdca/sdca_functions.c @@ -1159,7 +1159,7 @@ static int find_sdca_entity_ge(struct device *dev, num_affected = fwnode_property_count_u8(entity_node, "mipi-sdca-ge-selectedmode-controls-affected"); - if (!num_affected || num_affected == -EINVAL) { + if (!num_affected) { return 0; } else if (num_affected < 0) { dev_err(dev, "%s: failed to read affected controls: %d\n",