linux-mips
[Top] [All Lists]

[PATCH 1/1] MIPS: Octeon: remove unnecessary null test before debugfs_re

To: linux-kernel@vger.kernel.org
Subject: [PATCH 1/1] MIPS: Octeon: remove unnecessary null test before debugfs_remove_recursive
From: Fabian Frederick <fabf@skynet.be>
Date: Sun, 29 Jun 2014 09:16:19 +0200
Cc: Fabian Frederick <fabf@skynet.be>, Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Fix checkpatch warning:
WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not 
required

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 arch/mips/cavium-octeon/oct_ilm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/mips/cavium-octeon/oct_ilm.c 
b/arch/mips/cavium-octeon/oct_ilm.c
index 71b213d..2d68a39 100644
--- a/arch/mips/cavium-octeon/oct_ilm.c
+++ b/arch/mips/cavium-octeon/oct_ilm.c
@@ -194,8 +194,7 @@ err_irq:
 static __exit void oct_ilm_module_exit(void)
 {
        disable_timer(TIMER_NUM);
-       if (dir)
-               debugfs_remove_recursive(dir);
+       debugfs_remove_recursive(dir);
        free_irq(OCTEON_IRQ_TIMER0 + TIMER_NUM, 0);
 }
 
-- 
1.8.4.5


<Prev in Thread] Current Thread [Next in Thread>