diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/sound.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c index 44a69bb8d4f0..7872a02f6ca9 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -152,6 +152,10 @@ static int __snd_open(struct inode *inode, struct file *file) | |||
152 | } | 152 | } |
153 | old_fops = file->f_op; | 153 | old_fops = file->f_op; |
154 | file->f_op = fops_get(mptr->f_ops); | 154 | file->f_op = fops_get(mptr->f_ops); |
155 | if (file->f_op == NULL) { | ||
156 | file->f_op = old_fops; | ||
157 | return -ENODEV; | ||
158 | } | ||
155 | if (file->f_op->open) | 159 | if (file->f_op->open) |
156 | err = file->f_op->open(inode, file); | 160 | err = file->f_op->open(inode, file); |
157 | if (err) { | 161 | if (err) { |