ASoC: dapm: Add missing return value check for snd_soc_dapm_new_dai
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 10 Sep 2018 14:28:39 +0000 (15:28 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 10 Sep 2018 14:43:50 +0000 (15:43 +0100)
commite36a1d0d249aa09f94d551cadf043a7f9f7fae00
treeb3d3297b659b67f1ad101a9c93c02b4b65b5b866
parentca92cc4636fdedf0d7ee88a5e50cd2b85c246a3b
ASoC: dapm: Add missing return value check for snd_soc_dapm_new_dai

snd_soc_dapm_new_dai may return an error pointer and currently this
isn't checked for in dapm_connect_dai_link_widgets. Add code to check
the return value and not add routes in that case.

Fixes: 778ff5bb8689 ("ASoC: dapm: Move connection of CODEC to CODEC DAIs")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dapm.c