ChangeSet 1.2270, 2005/03/31 08:39:42-08:00, [EMAIL PROTECTED]

        [PATCH] paport oops fix
        
        It appears that the parport driver claims on-board superio devices 
without
        actually doing anything.  When the driver is removed, we try to 
dereference
        non-existent driver data to unregister the ports.  Since we didn't 
register
        anything, it's safe to ignore these devices in the remove function.
        
        Signed-off-by: Russell King <[EMAIL PROTECTED]>
        Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
        Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>



 parport_pc.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


diff -Nru a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
--- a/drivers/parport/parport_pc.c      2005-03-31 10:20:16 -08:00
+++ b/drivers/parport/parport_pc.c      2005-03-31 10:20:16 -08:00
@@ -2976,10 +2976,12 @@
 
        pci_set_drvdata(dev, NULL);
 
-       for (i = data->num - 1; i >= 0; i--)
-               parport_pc_unregister_port(data->ports[i]);
+       if (data) {
+               for (i = data->num - 1; i >= 0; i--)
+                       parport_pc_unregister_port(data->ports[i]);
 
-       kfree(data);
+               kfree(data);
+       }
 }
 
 static struct pci_driver parport_pc_pci_driver = {
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to