]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/sound.c
ALSA: emu10k1 - Fix digital/analog switch on audigy2 ZS
[linux-2.6-omap-h63xx.git] / sound / core / sound.c
index 44a69bb8d4f018e953cf0de692a9fb681a4a74b0..7872a02f6ca998602b588dc6ba4d7741c3e08c1b 100644 (file)
@@ -152,6 +152,10 @@ static int __snd_open(struct inode *inode, struct file *file)
        }
        old_fops = file->f_op;
        file->f_op = fops_get(mptr->f_ops);
+       if (file->f_op == NULL) {
+               file->f_op = old_fops;
+               return -ENODEV;
+       }
        if (file->f_op->open)
                err = file->f_op->open(inode, file);
        if (err) {