Skip to content

Commit

Permalink
ASoC: SDCA: Correct handling of selected mode DisCo property
Browse files Browse the repository at this point in the history
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 <mstrozek@opensource.cirrus.com>
Fixes: 13fe7497af19 ("ASoC: SDCA: Add support for GE Entity properties")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250321135324.380237-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Charles Keepax authored and Mark Brown committed Mar 21, 2025
1 parent 5a4dd52 commit 9ef52d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/sdca/sdca_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9ef52d5

Please sign in to comment.