diff options
author | Shahar Avidar <[email protected]> | 2024-04-05 10:39:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-04-09 17:52:14 +0200 |
commit | 78d17ecffcf41e3117a6c0408d186b99c555de76 (patch) | |
tree | a813e80da02e4bca4aa53d07fe1ff4ff5c4e8687 | |
parent | bd9ea55b228b689e79ebe09ab267a1181b384155 (diff) |
staging: pi433: Add debugfs_remove in case of driver register fails.
debugfs resources were never cleaned in case of failure to register driver.
Reported-by Dan Carpenter <[email protected]>
Fixes: 4ef027d5a367 ("staging: pi433: add debugfs interface")
Signed-off-by: Shahar Avidar <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/pi433/pi433_if.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c index 8aa6659936e8..633daf50a401 100644 --- a/drivers/staging/pi433/pi433_if.c +++ b/drivers/staging/pi433/pi433_if.c @@ -1413,6 +1413,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); |