Skip to content

Commit

Permalink
[PATCH] tipar oops fix
Browse files Browse the repository at this point in the history
If compiled into the kernel, parport_register_driver() is called before the
parport driver has been initalised.

This means that it is expected that tp_count is 0 after the
parport_register_driver() call() - tipar's attach function will not be
called until later during bootup.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Daniel Drake authored and Linus Torvalds committed Apr 28, 2006
1 parent 13e87ec commit 1ac3836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/char/tipar.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ tipar_init_module(void)
err = PTR_ERR(tipar_class);
goto out_chrdev;
}
if (parport_register_driver(&tipar_driver) || tp_count == 0) {
if (parport_register_driver(&tipar_driver)) {
printk(KERN_ERR "tipar: unable to register with parport\n");
err = -EIO;
goto out_class;
Expand Down

0 comments on commit 1ac3836

Please sign in to comment.