[PATCH v3 7/7] staging: pi433: Reorder pi433_exit cleanup calls.

From: Shahar Avidar
Date: Fri Apr 05 2024 - 03:41:48 EST


debugfs_remove was called out of order.
Ensure pi433 init & exit have reverse function calls order.

Signed-off-by: Shahar Avidar <ikobh7@xxxxxxxxx>
---
drivers/staging/pi433/pi433_if.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 77e37a5bd1a2..67b945a41067 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -1427,9 +1427,9 @@ module_init(pi433_init);
static void __exit pi433_exit(void)
{
spi_unregister_driver(&pi433_spi_driver);
+ debugfs_remove(root_dir);
class_unregister(&pi433_class);
unregister_chrdev(MAJOR(pi433_devt), pi433_spi_driver.driver.name);
- debugfs_remove(root_dir);
}
module_exit(pi433_exit);

--
2.34.1