blob: e98ee8d8e11e9577188aa7ea93991eaa34b8f35e [file] [log] [blame]
From ced7eccb2df20778eb1aed34fb807e435b13a030 Mon Sep 17 00:00:00 2001
From: Sasha Levin <sashal@kernel.org>
Date: Fri, 21 Jun 2019 15:56:31 +0300
Subject: mfd: intel-lpss: Release IDA resources
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[ 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@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 22dd8c055048c..71cecd7aeea0c 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -533,6 +533,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