[PATCH 2/2] ASoC: SDCA: make find_sdca_control_reset() return void
From: Srinivas Kandagatla
Date: Tue Sep 08 2026 - 02:56:04 EST
find_sdca_control_reset() only ever returns 0 -- it just sets
control->has_reset / control->reset for the framework-known
(entity type, control selector) mappings. The int return + caller
error check in find_sdca_entity_control() are dead code.
Convert to void and drop the check. No functional change.
Reviewed-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxx>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxxxxxxxx>
---
sound/soc/sdca/sdca_functions.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
index 30fa0324648a..b55e3ad8ea34 100644
--- a/sound/soc/sdca/sdca_functions.c
+++ b/sound/soc/sdca/sdca_functions.c
@@ -920,8 +920,8 @@ static int find_sdca_control_value(struct device *dev, struct sdca_entity *entit
return 0;
}
-static int find_sdca_control_reset(const struct sdca_entity *entity,
- struct sdca_control *control)
+static void find_sdca_control_reset(const struct sdca_entity *entity,
+ struct sdca_control *control)
{
switch (SDCA_CTL_TYPE(entity->type, control->sel)) {
case SDCA_CTL_TYPE_S(FU, AGC):
@@ -948,8 +948,6 @@ static int find_sdca_control_reset(const struct sdca_entity *entity,
default:
break;
}
-
- return 0;
}
static int find_sdca_entity_control(struct device *dev, struct sdca_entity *entity,
@@ -1030,9 +1028,7 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
control->is_volatile = find_sdca_control_volatile(entity, control);
- ret = find_sdca_control_reset(entity, control);
- if (ret)
- return ret;
+ find_sdca_control_reset(entity, control);
ret = find_sdca_control_range(dev, control_node, &control->range);
if (ret) {
--
2.53.0