diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 190d4423653f6b99690967ba3602915eda5463fb..fd504d3585968e01d5d85a0677ae6bd8ff07d410 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -143,8 +143,8 @@ static int misc_open(struct inode * inode, struct file * file) err = 0; old_fops = file->f_op; file->f_op = new_fops; + file->private_data = c; if (file->f_op->open) { - file->private_data = c; err=file->f_op->open(inode,file); if (err) { fops_put(file->f_op);