From 5d26423fab6a2587c3d0e49e2378e8f01224f786 Mon Sep 17 00:00:00 2001 From: Bobo Date: Thu, 18 Nov 2021 15:16:52 +0000 Subject: [PATCH] altra_cpuectlr: fix re-insmod errors Signed-off-by: Bobo --- drivers/firmware/altra_cpuectlr_el1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/firmware/altra_cpuectlr_el1.c b/drivers/firmware/altra_cpuectlr_el1.c index 08b661888ecd..9277ffdc0d7b 100644 --- a/drivers/firmware/altra_cpuectlr_el1.c +++ b/drivers/firmware/altra_cpuectlr_el1.c @@ -177,6 +177,9 @@ static int __init altra_cpuectlr_init(void) static void __exit altra_cpuectlr_exit(void) { sysfs_remove_group(cpuectlr_el1_kobj, &cpuectlr_el1_group); + kobject_put(cpuectlr_el1_kobj); + if (cpuectlr_el1_addr) + iounmap(cpuectlr_el1_addr); } module_init(altra_cpuectlr_init);