aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
40 40
41int sst_register_dsp(struct sst_device *dev) 41int sst_register_dsp(struct sst_device *dev)
42{ 42{
43 BUG_ON(!dev); 43 if (WARN_ON(!dev))
44 return -EINVAL;
44 if (!try_module_get(dev->dev->driver->owner)) 45 if (!try_module_get(dev->dev->driver->owner))
45 return -ENODEV; 46 return -ENODEV;
46 mutex_lock(&sst_lock); 47 mutex_lock(&sst_lock);
@@ -59,7 +60,8 @@ EXPORT_SYMBOL_GPL(sst_register_dsp);
59 60
60int sst_unregister_dsp(struct sst_device *dev) 61int sst_unregister_dsp(struct sst_device *dev)
61{ 62{
62 BUG_ON(!dev); 63 if (WARN_ON(!dev))
64 return -EINVAL;
63 if (dev != sst) 65 if (dev != sst)
64 return -EINVAL; 66 return -EINVAL;
65 67