mfd: intel-lpss: Release IDA resources
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 21 Jun 2019 12:56:31 +0000 (15:56 +0300)
committerLee Jones <lee.jones@linaro.org>
Tue, 2 Jul 2019 11:11:31 +0000 (12:11 +0100)
ida instances allocate some internal memory for ->free_bitmap
in addition to the base 'struct ida'. Use ida_destroy() to release
that memory at module_exit().

Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/intel-lpss.c

index fc6aa4c5014422d46170540307f4774fe2ea540e..2ba6df9d83afe46089ea24e59723f2dc0e04c4d5 100644 (file)
@@ -546,6 +546,7 @@ module_init(intel_lpss_init);
 
 static void __exit intel_lpss_exit(void)
 {
+       ida_destroy(&intel_lpss_devid_ida);
        debugfs_remove(intel_lpss_debugfs);
 }
 module_exit(intel_lpss_exit);