Skip to content

Commit 3853111

Browse files
bardliaobroonie
authored andcommitted
ASoC: max98363: don't return on success reading revision ID
max98363_io_init needs to keep going when we read revision ID successfully. Fixes: 18c0af9 ("ASoC: max98363: add soundwire amplifier driver") Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20230804034734.3848227-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent f803ec6 commit 3853111

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sound/soc/codecs/max98363.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ static int max98363_io_init(struct sdw_slave *slave)
185185
pm_runtime_get_noresume(dev);
186186

187187
ret = regmap_read(max98363->regmap, MAX98363_R21FF_REV_ID, &reg);
188-
if (!ret) {
188+
if (!ret)
189189
dev_info(dev, "Revision ID: %X\n", reg);
190-
return ret;
191-
}
190+
else
191+
goto out;
192192

193193
if (max98363->first_hw_init) {
194194
regcache_cache_bypass(max98363->regmap, false);
@@ -198,10 +198,11 @@ static int max98363_io_init(struct sdw_slave *slave)
198198
max98363->first_hw_init = true;
199199
max98363->hw_init = true;
200200

201+
out:
201202
pm_runtime_mark_last_busy(dev);
202203
pm_runtime_put_autosuspend(dev);
203204

204-
return 0;
205+
return ret;
205206
}
206207

207208
#define MAX98363_RATES SNDRV_PCM_RATE_8000_192000

0 commit comments

Comments
 (0)