acpi: remove a meaningless null check before debugfs_remove
PATCH 1/1 acpi: remove a meaningless null check before debugfs_remove
debugfs_remove has taken null pointer into account. So it is safe to remove the check before debugfs_remove.
Signed-off-by zhong jiang <[email protected]>
--- drivers/acpi/custom_method.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/acpi/custom_method.c +1 -2
@@ -92,8 +92,7 @@ static int __init acpi_custom_method_init(void) static void __exit acpi_custom_method_exit(void) { -if (cm_dentry) -debugfs_remove (cm_dentry); +debugfs_remove (cm_dentry); }module_init (acpi_custom_method_init);
Signature · 1 line
1.7.12.4
+to maintainers
Quoted 22 lines · zhong jiang
debugfs_removehas taken null pointer into account. So it is safe to remove the check beforedebugfs_remove.Signed-off-by zhong jiang <[email protected]>--- drivers/acpi/custom_method.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/acpi/custom_method.c +1
-2@@ -92,8 +92,7 @@ static int __init acpi_custom_method_init(void) static void __exit acpi_custom_method_exit(void) { -if (cm_dentry) -debugfs_remove (cm_dentry); +debugfs_remove (cm_dentry); }module_init (acpi_custom_method_init);
Rafael J. Wysocki
AppliedQuoted 14 lines · CEST zhong jiang
debugfs_removehas taken null pointer into account. So it is safe to remove the check beforedebugfs_remove.Signed-off-by zhong jiang <[email protected]>--- drivers/acpi/custom_method.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/acpi/custom_method.c +0
-0
drivers/acpi/custom_method.c static int __init acpi_custom_method_init(void) · line 98
Quoted 9 lines
drivers/acpi/custom_method.c +1
-2@@ -92,8 +92,7 @@ static int __init acpi_custom_method_init(void) static void __exit acpi_custom_method_exit(void) { -if (cm_dentry) -debugfs_remove (cm_dentry); +debugfs_remove (cm_dentry); }module_init (acpi_custom_method_init);
Applied, thanks!