[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221009034009.60026-2-yangyingliang@huawei.com>
Date: Sun, 9 Oct 2022 11:40:07 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <linux-kernel@...r.kernel.org>
CC: <chenhuacai@...nel.org>, <lvjianmin@...ngson.cn>,
<chenhuacai@...ngson.cn>
Subject: [PATCH -next 1/3] platform/loongarch: laptop: add missing platform_driver_unregister() in generic_subdriver_exit()
If setup_acpi_notify() fails in generic_subdriver_init(),
platform_driver_unregister() need be called. Call it in
generic_subdriver_exit().
Fixes: ee7fa5029de8 ("LoongArch: Add ACPI-based generic laptop driver")
Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
---
drivers/platform/loongarch/loongson-laptop.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/platform/loongarch/loongson-laptop.c
index e61fe7c305e0..d9f82c3991c0 100644
--- a/drivers/platform/loongarch/loongson-laptop.c
+++ b/drivers/platform/loongarch/loongson-laptop.c
@@ -535,6 +535,7 @@ static void generic_subdriver_exit(struct generic_sub_driver *sub_driver)
sub_driver->type, dispatch_acpi_notify);
sub_driver->acpi_notify_installed = 0;
}
+ platform_driver_unregister(sub_driver->driver);
}
static struct generic_sub_driver generic_sub_drivers[] __refdata = {
--
2.25.1
Powered by blists - more mailing lists