aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/rockchip
diff options
context:
space:
mode:
authorJudy Hsiao <judyhsiao@chromium.org>2022-07-01 02:14:27 +0000
committerMark Brown <broonie@kernel.org>2022-07-05 19:53:53 +0100
commit0ff9f8b9f59208332c6707e37d5739c57c7f7bce (patch)
treeec853cbc7d54af4f3f76a798daaf72620a7ecb62 /sound/soc/rockchip
parentASoC: dt-bindings: qcom,sm8250: add SDM845 sound (diff)
downloadlinux-dev-0ff9f8b9f59208332c6707e37d5739c57c7f7bce.tar.xz
linux-dev-0ff9f8b9f59208332c6707e37d5739c57c7f7bce.zip
ASoC: rockchip: i2s: Fix error code when fail to read I2S_CLR
Add the error code '-EBUSY' when fail to read I2S_CLR in rockchip_snd_rxctrl() and rockchip_snd_txctrl() Fixes: 44f362c2cc6d ("ASoC: rockchip: i2s: switch BCLK to GPIO") Signed-off-by: Judy Hsiao <judyhsiao@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> Link: https://lore.kernel.org/r/20220701021427.3120549-1-judyhsiao@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/rockchip')
-rw-r--r--sound/soc/rockchip/rockchip_i2s.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index 22ba1066c933..ee33c5d2e948 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -171,6 +171,7 @@ static int rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on)
retry--;
if (!retry) {
dev_warn(i2s->dev, "fail to clear\n");
+ ret = -EBUSY;
break;
}
}
@@ -232,6 +233,7 @@ static int rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on)
retry--;
if (!retry) {
dev_warn(i2s->dev, "fail to clear\n");
+ ret = -EBUSY;
break;
}
}