瀏覽代碼

[PCMCIA] 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.

Signed-off-by: Igor Popik <igor.popik@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Igor Popik 19 年之前
父節點
當前提交
a2932b35a0
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/pcmcia/i82365.c

+ 1 - 0
drivers/pcmcia/i82365.c

@@ -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;
     }