aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/hwdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index 9aa9d94891f0..46b47689362c 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -158,6 +158,7 @@ static int snd_hwdep_release(struct inode *inode, struct file * file)
158{ 158{
159 int err = -ENXIO; 159 int err = -ENXIO;
160 struct snd_hwdep *hw = file->private_data; 160 struct snd_hwdep *hw = file->private_data;
161 struct module *mod = hw->card->module;
161 mutex_lock(&hw->open_mutex); 162 mutex_lock(&hw->open_mutex);
162 if (hw->ops.release) { 163 if (hw->ops.release) {
163 err = hw->ops.release(hw, file); 164 err = hw->ops.release(hw, file);
@@ -167,7 +168,7 @@ static int snd_hwdep_release(struct inode *inode, struct file * file)
167 hw->used--; 168 hw->used--;
168 snd_card_file_remove(hw->card, file); 169 snd_card_file_remove(hw->card, file);
169 mutex_unlock(&hw->open_mutex); 170 mutex_unlock(&hw->open_mutex);
170 module_put(hw->card->module); 171 module_put(mod);
171 return err; 172 return err;
172} 173}
173 174