summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto2019-07-10 09:59:55 +0200
committerMark Brown2019-07-10 17:25:29 +0200
commit52db6685932e326ed607644ab7ebdae8c194adda (patch)
tree7817e025b3f8dfc9b5b9ab05426cd38c5269e7fa /include/sound
parentASoC: Relocate my e-mail to .com domain zone (diff)
downloadkernel-qcow2-linux-52db6685932e326ed607644ab7ebdae8c194adda.tar.gz
kernel-qcow2-linux-52db6685932e326ed607644ab7ebdae8c194adda.tar.xz
kernel-qcow2-linux-52db6685932e326ed607644ab7ebdae8c194adda.zip
ASoC: simple_card_utils.h: care NULL dai at asoc_simple_debug_dai()
props->xxx_dai might be NULL when DPCM. This patch cares it for debug. Fixes: commit 0580dde59438 ("ASoC: simple-card-utils: add asoc_simple_debug_info()") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87o922gw4u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/simple_card_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index 954563ee2277..985a5f583de4 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -141,6 +141,10 @@ inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv,
{
struct device *dev = simple_priv_to_dev(priv);
+ /* dai might be NULL */
+ if (!dai)
+ return;
+
if (dai->name)
dev_dbg(dev, "%s dai name = %s\n",
name, dai->name);