summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-09-07 10:59:17 +0200
committerMark Brown <broonie@kernel.org>2017-09-20 12:45:36 +0100
commitbefff4fbc27e19b14b343eb4a65d8f75d38b6230 (patch)
tree09f7a399dc4d183749ff680b0cd0b50d06758adf /sound
parent1b8b68b05d1868404316d32e20782b00442aba90 (diff)
downloadop-kernel-dev-befff4fbc27e19b14b343eb4a65d8f75d38b6230.zip
op-kernel-dev-befff4fbc27e19b14b343eb4a65d8f75d38b6230.tar.gz
ASoC: davinci: Kill BUG_ON() usage
Don't use BUG_ON() for a non-critical sanity check on production systems. This patch replaces with a softer WARN_ON() and an error path. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/davinci/davinci-mcasp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 23b0da7..40be08c 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -1721,7 +1721,8 @@ static int davinci_mcasp_get_dma_type(struct davinci_mcasp *mcasp)
PTR_ERR(chan));
return PTR_ERR(chan);
}
- BUG_ON(!chan->device || !chan->device->dev);
+ if (WARN_ON(!chan->device || !chan->device->dev))
+ return -EINVAL;
if (chan->device->dev->of_node)
ret = of_property_read_string(chan->device->dev->of_node,
OpenPOWER on IntegriCloud