[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240405074000.3481217-7-ikobh7@gmail.com>
Date: Fri, 5 Apr 2024 10:39:59 +0300
From: Shahar Avidar <ikobh7@...il.com>
To: gregkh@...uxfoundation.org,
hverkuil-cisco@...all.nl,
andriy.shevchenko@...ux.intel.com,
robh@...nel.org,
felixkimbu1@...il.com
Cc: linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH v3 6/7] staging: pi433: Add debugfs_remove in case of driver register fails.
debugfs resources were never cleaned in case of failure to register driver.
Fixes: 4ef027d5a367 ("staging: pi433: add debugfs interface")
Reported-by Dan Carpenter <dan.carpenter@...aro.org>
Signed-off-by: Shahar Avidar <ikobh7@...il.com>
---
drivers/staging/pi433/pi433_if.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index b01ee145ff3c..77e37a5bd1a2 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -1415,6 +1415,7 @@ static int __init pi433_init(void)
return 0;
unreg_class_and_remove_dbfs:
+ debugfs_remove(root_dir);
class_unregister(&pi433_class);
unreg_chrdev:
unregister_chrdev(MAJOR(pi433_devt), pi433_spi_driver.driver.name);
--
2.34.1
Powered by blists - more mailing lists