[PATCH 4.19 458/639] mfd: intel-lpss: Release IDA resources
From: Greg Kroah-Hartman
Date: Fri Jan 24 2020 - 06:25:22 EST
From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
[ Upstream commit 02f36911c1b41fcd8779fa0c135aab0554333fa5 ]
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@xxxxxxxxxxxxxxx>
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
drivers/mfd/intel-lpss.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index ff3fba16e7359..95e217e6b6d75 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -545,6 +545,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);
--
2.20.1