Unverified Commit 9ff07d19 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <871r9snbji.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 54e81e94
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -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;								\