From: Igor Popik Date: Wed, 7 Dec 2005 07:46:33 +0000 (+0100) Subject: [PATCH] i82365: release all resources if no devices are found X-Git-Tag: v2.6.14.4~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28e52c66f8fa3d112036b5539d80eaf90a9693b6;p=thirdparty%2Fkernel%2Fstable.git [PATCH] i82365: release all resources if no devices are found 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 (e.g. bug #5657). Signed-off-by: Igor Popik Signed-off-by: Dominik Brodowski Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c index a713015e8228c..7d9898f7e82c1 100644 --- a/drivers/pcmcia/i82365.c +++ b/drivers/pcmcia/i82365.c @@ -1382,6 +1382,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; }