]> err.no Git - linux-2.6/commitdiff
[PCMCIA] i82365: release all resources if no devices are found
authorIgor Popik <igor.popik@gmail.com>
Thu, 6 Oct 2005 18:32:58 +0000 (20:32 +0200)
committerDominik Brodowski <linux@dominikbrodowski.net>
Thu, 10 Nov 2005 10:42:16 +0000 (11:42 +0100)
The i82365 driver does not release all the resources when the device is not
found. This can cause an oops when reading /proc/ioports after module
unload.

Signed-off-by: Igor Popik <igor.popik@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
drivers/pcmcia/i82365.c

index 7ce455d01cc919a761ecd5de44bfc504c6246714..4ddd76239b34aff80f4783f9e2557baa51038326 100644 (file)
@@ -1366,6 +1366,7 @@ static int __init init_i82365(void)
     if (sockets == 0) {
        printk("not found.\n");
        platform_device_unregister(&i82365_device);
+       release_region(i365_base, 2);
        driver_unregister(&i82365_driver);
        return -ENODEV;
     }