From: Kuninori Morimoto Date: Thu, 17 Dec 2015 02:56:31 +0000 (+0000) Subject: ASoC: rsnd: rsnd_dai_connect() returns error if it connect to existing mod X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=52dc68524327ed7bedfc2856bca4fa634f11141a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: rsnd: rsnd_dai_connect() returns error if it connect to existing mod Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 44f32c1db05d..e59dc8a461bb 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -354,6 +354,9 @@ int rsnd_dai_connect(struct rsnd_mod *mod, if (!mod) return -EIO; + if (io->mod[type]) + return -EINVAL; + priv = rsnd_mod_to_priv(mod); dev = rsnd_priv_to_dev(priv);