Skip to content

Commit 30f48fe

Browse files
morimotoDinh Nguyen
authored andcommitted
ASoC: rsnd: tidyup parameter assignment position
84e9535("ASoC: rsnd: show debug message for SSI/SRC/DVC connection") added debug message on rsnd_dai_connect(), but the relationship of parameter check was absurdity. This patch tidyup it. It is reported via Smatch/Dan Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]> (cherry picked from commit 48725e9) Signed-off-by: Simon Horman <[email protected]>
1 parent eb2caa8 commit 30f48fe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sound/soc/sh/rcar/core.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,15 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
332332
static int rsnd_dai_connect(struct rsnd_mod *mod,
333333
struct rsnd_dai_stream *io)
334334
{
335-
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
336-
struct device *dev = rsnd_priv_to_dev(priv);
335+
struct rsnd_priv *priv;
336+
struct device *dev;
337337

338338
if (!mod)
339339
return -EIO;
340340

341+
priv = rsnd_mod_to_priv(mod);
342+
dev = rsnd_priv_to_dev(priv);
343+
341344
io->mod[mod->type] = mod;
342345

343346
dev_dbg(dev, "%s[%d] is connected to io (%s)\n",

0 commit comments

Comments
 (0)