Commit 2cf36de1 authored by Mikael Pettersson's avatar Mikael Pettersson Committed by Linus Torvalds

[PATCH] fix drivers/char/misc.c module autoloading breakage

drivers/char/misc.c was changed to use the common list macros instead of
its own list code.  The first open does load the module and increment
its use count, but a bug causes a failure to be reported anyway.  This
causes an error return to user-space where there is none, and makes the
module non-unloadable.

Fixed like this.
parent 394a26ad
......@@ -157,11 +157,10 @@ static int misc_open(struct inode * inode, struct file * file)
list_for_each_entry(c, &misc_list, list) {
if (c->minor == minor) {
new_fops = fops_get(c->fops);
if (!new_fops)
goto fail;
break;
}
}
if (!new_fops)
goto fail;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment