summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/core.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-05-27 11:41:21 +0900
committerMark Brown <broonie@kernel.org>2021-05-27 11:15:29 +0100
commit9ff07d19fb28ce8544d3ee4755673020b00487e6 (patch)
tree0c606238d46625755c562ed89e2890906e701f9b /sound/soc/sh/rcar/core.c
parent54e81e9446377c36fdcb952ca7db43e59857e0d7 (diff)
downloadlinux-9ff07d19fb28ce8544d3ee4755673020b00487e6.tar.gz
linux-9ff07d19fb28ce8544d3ee4755673020b00487e6.tar.bz2
linux-9ff07d19fb28ce8544d3ee4755673020b00487e6.zip
ASoC: rsnd: indicate unknown error at rsnd_dai_call()
Current rsnd_dai_call() doesn't indicate error message, thus it is very difficult to know the issue when strange things happen. This patch indicates error for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Message-Id: <871r9snbji.wl-kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/core.c')
-rw-r--r--sound/soc/sh/rcar/core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index eef4f77e105b..bf90783659e7 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -543,7 +543,7 @@ static int rsnd_status_update(u32 *status,
int func_call = (val == timing);
if (next_val == 0xF) /* underflow case */
- func_call = 0;
+ func_call = -1;
else
*status = (*status & ~mask) + (next_val << shift);
@@ -567,11 +567,12 @@ static int rsnd_status_update(u32 *status,
rsnd_dbg_dai_call(dev, "%s\t0x%08x %s\n", \
rsnd_mod_name(mod), *status, \
(func_call && (mod)->ops->fn) ? #fn : ""); \
- if (func_call && (mod)->ops->fn) \
+ if (func_call > 0 && (mod)->ops->fn) \
tmp = (mod)->ops->fn(mod, io, param); \
- if (tmp && (tmp != -EPROBE_DEFER)) \
- dev_err(dev, "%s : %s error %d\n", \
- rsnd_mod_name(mod), #fn, tmp); \
+ if (unlikely(func_call < 0) || \
+ unlikely(tmp && (tmp != -EPROBE_DEFER))) \
+ dev_err(dev, "%s : %s error (%d, %d)\n", \
+ rsnd_mod_name(mod), #fn, tmp, func_call);\
ret |= tmp; \
} \
ret; \