diff options
author | Mark Brown <broonie@linaro.org> | 2013-11-08 10:43:41 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-08 10:43:41 +0000 |
commit | 108145a60675ebc0e42e7964ee6666096bbf86ce (patch) | |
tree | 19266ab0500d7bb188eb53634d484054d59473d2 /sound/soc/mid-x86 | |
parent | 022aa51e3fda0b3c6688defaa859961c11c36ec8 (diff) | |
parent | bf4edea863c435c302041cf8bb01c8b3ca729449 (diff) | |
download | linux-108145a60675ebc0e42e7964ee6666096bbf86ce.tar.gz linux-108145a60675ebc0e42e7964ee6666096bbf86ce.tar.bz2 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.c | 6 |
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; |