patch-2.4.10 linux/drivers/parport/parport_serial.c
Next file: linux/drivers/pci/Makefile
Previous file: linux/drivers/parport/parport_pc.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Fri Sep 7 18:15:17 2001
- Orig file:
v2.4.9/linux/drivers/parport/parport_serial.c
- Orig date:
Wed Jul 25 17:10:22 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/parport/parport_serial.c linux/drivers/parport/parport_serial.c
@@ -296,7 +296,16 @@
return err;
}
- if (serial_register (dev, id) + parport_register (dev, id)) {
+ if (parport_register (dev, id)) {
+ pci_set_drvdata (dev, NULL);
+ kfree (priv);
+ return -ENODEV;
+ }
+
+ if (serial_register (dev, id)) {
+ int i;
+ for (i = 0; i < priv->num_par; i++)
+ parport_pc_unregister_port (priv->port[i]);
pci_set_drvdata (dev, NULL);
kfree (priv);
return -ENODEV;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)