diff options
-rw-r--r-- | sound/soc/sh/rcar/core.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index b234ed663073..2e09ee8d2500 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c | |||
@@ -279,15 +279,13 @@ int rsnd_dai_connect(struct rsnd_dai *rdai, | |||
279 | struct rsnd_mod *mod, | 279 | struct rsnd_mod *mod, |
280 | struct rsnd_dai_stream *io) | 280 | struct rsnd_dai_stream *io) |
281 | { | 281 | { |
282 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); | 282 | if (!mod) |
283 | struct device *dev = rsnd_priv_to_dev(priv); | ||
284 | |||
285 | if (!mod) { | ||
286 | dev_err(dev, "NULL mod\n"); | ||
287 | return -EIO; | 283 | return -EIO; |
288 | } | ||
289 | 284 | ||
290 | if (!list_empty(&mod->list)) { | 285 | if (!list_empty(&mod->list)) { |
286 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); | ||
287 | struct device *dev = rsnd_priv_to_dev(priv); | ||
288 | |||
291 | dev_err(dev, "%s%d is not empty\n", | 289 | dev_err(dev, "%s%d is not empty\n", |
292 | rsnd_mod_name(mod), | 290 | rsnd_mod_name(mod), |
293 | rsnd_mod_id(mod)); | 291 | rsnd_mod_id(mod)); |