Commit 38531110 authored by Bard Liao's avatar Bard Liao Committed by Mark Brown

ASoC: max98363: don't return on success reading revision ID

max98363_io_init needs to keep going when we read revision ID
successfully.

Fixes: 18c0af94 ("ASoC: max98363: add soundwire amplifier driver")
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20230804034734.3848227-1-yung-chuan.liao@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f803ec63
...@@ -185,10 +185,10 @@ static int max98363_io_init(struct sdw_slave *slave) ...@@ -185,10 +185,10 @@ static int max98363_io_init(struct sdw_slave *slave)
pm_runtime_get_noresume(dev); pm_runtime_get_noresume(dev);
ret = regmap_read(max98363->regmap, MAX98363_R21FF_REV_ID, &reg); ret = regmap_read(max98363->regmap, MAX98363_R21FF_REV_ID, &reg);
if (!ret) { if (!ret)
dev_info(dev, "Revision ID: %X\n", reg); dev_info(dev, "Revision ID: %X\n", reg);
return ret; else
} goto out;
if (max98363->first_hw_init) { if (max98363->first_hw_init) {
regcache_cache_bypass(max98363->regmap, false); regcache_cache_bypass(max98363->regmap, false);
...@@ -198,10 +198,11 @@ static int max98363_io_init(struct sdw_slave *slave) ...@@ -198,10 +198,11 @@ static int max98363_io_init(struct sdw_slave *slave)
max98363->first_hw_init = true; max98363->first_hw_init = true;
max98363->hw_init = true; max98363->hw_init = true;
out:
pm_runtime_mark_last_busy(dev); pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev); pm_runtime_put_autosuspend(dev);
return 0; return ret;
} }
#define MAX98363_RATES SNDRV_PCM_RATE_8000_192000 #define MAX98363_RATES SNDRV_PCM_RATE_8000_192000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment