Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] tipar oops fix

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>

authored by

Daniel Drake and committed by
Linus Torvalds
1ac3836c 13e87ec6

+1 -1
+1 -1
drivers/char/tipar.c
··· 515 515 err = PTR_ERR(tipar_class); 516 516 goto out_chrdev; 517 517 } 518 - if (parport_register_driver(&tipar_driver) || tp_count == 0) { 518 + if (parport_register_driver(&tipar_driver)) { 519 519 printk(KERN_ERR "tipar: unable to register with parport\n"); 520 520 err = -EIO; 521 521 goto out_class;