summaryrefslogtreecommitdiffstats
path: root/sound/soc/mid-x86
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-11-08 10:43:41 +0000
committerMark Brown <broonie@linaro.org>2013-11-08 10:43:41 +0000
commit108145a60675ebc0e42e7964ee6666096bbf86ce (patch)
tree19266ab0500d7bb188eb53634d484054d59473d2 /sound/soc/mid-x86
parent022aa51e3fda0b3c6688defaa859961c11c36ec8 (diff)
parentbf4edea863c435c302041cf8bb01c8b3ca729449 (diff)
downloadblackbird-op-linux-108145a60675ebc0e42e7964ee6666096bbf86ce.tar.gz
blackbird-op-linux-108145a60675ebc0e42e7964ee6666096bbf86ce.zip
Merge remote-tracking branch 'asoc/topic/warn' into asoc-next
Diffstat (limited to 'sound/soc/mid-x86')
-rw-r--r--sound/soc/mid-x86/sst_platform.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index 392fc0b8f5b8..b6b5eb698d33 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -40,7 +40,8 @@ static DEFINE_MUTEX(sst_lock);
int sst_register_dsp(struct sst_device *dev)
{
- BUG_ON(!dev);
+ if (WARN_ON(!dev))
+ return -EINVAL;
if (!try_module_get(dev->dev->driver->owner))
return -ENODEV;
mutex_lock(&sst_lock);
@@ -59,7 +60,8 @@ EXPORT_SYMBOL_GPL(sst_register_dsp);
int sst_unregister_dsp(struct sst_device *dev)
{
- BUG_ON(!dev);
+ if (WARN_ON(!dev))
+ return -EINVAL;
if (dev != sst)
return -EINVAL;
OpenPOWER on IntegriCloud