Skip to content

Commit 9ed4c76

Browse files
simontrimmerbroonie
authored andcommitted
ASoC: cs35l56: Don't return a value from cs35l56_remove()
cs35l56_remove() always returns 0. Two of the functions that call it are void and the other one should only return 0. So there's no point returning anything from cs35l56_remove(). Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230414133753.653139-6-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 4be4768 commit 9ed4c76

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

sound/soc/codecs/cs35l56-sdw.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,9 @@ static int cs35l56_sdw_remove(struct sdw_slave *peripheral)
527527
sdw_read_no_pm(peripheral, CS35L56_SDW_GEN_INT_STAT_1);
528528
sdw_write_no_pm(peripheral, CS35L56_SDW_GEN_INT_STAT_1, 0xFF);
529529

530-
return cs35l56_remove(cs35l56);
530+
cs35l56_remove(cs35l56);
531+
532+
return 0;
531533
}
532534

533535
static const struct dev_pm_ops cs35l56_sdw_pm = {

sound/soc/codecs/cs35l56.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ int cs35l56_init(struct cs35l56_private *cs35l56)
15901590
}
15911591
EXPORT_SYMBOL_NS_GPL(cs35l56_init, SND_SOC_CS35L56_CORE);
15921592

1593-
int cs35l56_remove(struct cs35l56_private *cs35l56)
1593+
void cs35l56_remove(struct cs35l56_private *cs35l56)
15941594
{
15951595
cs35l56->init_done = false;
15961596

@@ -1613,8 +1613,6 @@ int cs35l56_remove(struct cs35l56_private *cs35l56)
16131613

16141614
gpiod_set_value_cansleep(cs35l56->reset_gpio, 0);
16151615
regulator_bulk_disable(ARRAY_SIZE(cs35l56->supplies), cs35l56->supplies);
1616-
1617-
return 0;
16181616
}
16191617
EXPORT_SYMBOL_NS_GPL(cs35l56_remove, SND_SOC_CS35L56_CORE);
16201618

sound/soc/codecs/cs35l56.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ irqreturn_t cs35l56_irq(int irq, void *data);
7676
int cs35l56_irq_request(struct cs35l56_private *cs35l56, int irq);
7777
int cs35l56_common_probe(struct cs35l56_private *cs35l56);
7878
int cs35l56_init(struct cs35l56_private *cs35l56);
79-
int cs35l56_remove(struct cs35l56_private *cs35l56);
79+
void cs35l56_remove(struct cs35l56_private *cs35l56);
8080

8181
#endif /* ifndef CS35L56_H */

0 commit comments

Comments
 (0)