summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index ffa97d261cf3..205ad4c58470 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -142,8 +142,8 @@ static int misc_open(struct inode * inode, struct file * file)
err = 0;
replace_fops(file, new_fops);
+ file->private_data = c;
if (file->f_op->open) {
- file->private_data = c;
err = file->f_op->open(inode,file);
}
fail: