[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190905161759.28036-16-mathieu.poirier@linaro.org>
Date: Thu, 5 Sep 2019 10:17:56 -0600
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: stable@...r.kernel.org
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-omap@...r.kernel.org, linux-i2c@...r.kernel.org,
linux-pci@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: [BACKPORT 4.14.y 15/18] ASoC: davinci: Kill BUG_ON() usage
From: Takashi Iwai <tiwai@...e.de>
commit befff4fbc27e19b14b343eb4a65d8f75d38b6230 upstream
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@...e.de>
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
---
sound/soc/davinci/davinci-mcasp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index af6cd8b874f5..b4e6f4a04cb6 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -1748,7 +1748,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,
--
2.17.1
Powered by blists - more mailing lists