[PATCH 1/1] drivers/mfd/ab8500-debugfs.c: remove unnecessary null test before debugfs_remove_recursive

Subsystems: arm/nomadik/ux500 architectures, multifunction devices (mfd), the rest

STALE4454d

2 messages, 2 authors, 2014-07-02 · open the first message on its own page

[PATCH 1/1] drivers/mfd/ab8500-debugfs.c: remove unnecessary null test before debugfs_remove_recursive

From: Fabian Frederick <hidden>
Date: 2014-06-28 11:59:40

Fix checkpatch warning:
WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required

Cc: Linus Walleij <redacted>
Cc: Samuel Ortiz <redacted>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Fabian Frederick <redacted>
---
 drivers/mfd/ab8500-debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index d1a22aa..7ca8713 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -3192,8 +3192,7 @@ static int ab8500_debug_probe(struct platform_device *plf)
 	return 0;
 
 err:
-	if (ab8500_dir)
-		debugfs_remove_recursive(ab8500_dir);
+	debugfs_remove_recursive(ab8500_dir);
 	dev_err(&plf->dev, "failed to create debugfs entries.\n");
 
 	return -ENOMEM;
-- 
1.8.4.5

Re: [PATCH 1/1] drivers/mfd/ab8500-debugfs.c: remove unnecessary null test before debugfs_remove_recursive

From: Lee Jones <hidden>
Date: 2014-07-02 06:51:01

On Sat, 28 Jun 2014, Fabian Frederick wrote:
Fix checkpatch warning:
WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required

Cc: Linus Walleij <redacted>
Cc: Samuel Ortiz <redacted>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Fabian Frederick <redacted>
---
 drivers/mfd/ab8500-debugfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Applied, thanks.
quoted hunk
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index d1a22aa..7ca8713 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -3192,8 +3192,7 @@ static int ab8500_debug_probe(struct platform_device *plf)
 	return 0;
 
 err:
-	if (ab8500_dir)
-		debugfs_remove_recursive(ab8500_dir);
+	debugfs_remove_recursive(ab8500_dir);
 	dev_err(&plf->dev, "failed to create debugfs entries.\n");
 
 	return -ENOMEM;
-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help