patch-2.3.99-pre4 linux/drivers/char/ppdev.c

Next file: linux/drivers/char/pty.c
Previous file: linux/drivers/char/pcwd.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre3/linux/drivers/char/ppdev.c linux/drivers/char/ppdev.c
@@ -537,7 +537,7 @@
 	unsigned int minor = MINOR (inode->i_rdev);
 	struct pp_struct *pp = file->private_data;
 
-	if (pp->pdev->port->ieee1284.mode != IEEE1284_MODE_COMPAT) {
+	if (pp->pdev && pp->pdev->port->ieee1284.mode != IEEE1284_MODE_COMPAT) {
 		if (!(pp->flags & PP_CLAIMED)) {
 			parport_claim_or_block (pp->pdev);
 			pp->flags |= PP_CLAIMED;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)