linux-mips
[Top] [All Lists]

Re: [PATCH 1/1] MIPS: jz4740: remove unnecessary null test before debugf

To: Fabian Frederick <fabf@skynet.be>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] MIPS: jz4740: remove unnecessary null test before debugfs_remove
From: Lars-Peter Clausen <lars@metafoo.de>
Date: Sun, 29 Jun 2014 09:55:56 +0200
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <1404026663-3510-1-git-send-email-fabf@skynet.be>
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
References: <1404026663-3510-1-git-send-email-fabf@skynet.be>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.6.0
On 06/29/2014 09:24 AM, Fabian Frederick wrote:
Fix checkpatch warning:
WARNING: debugfs_remove(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>

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks.

---
  arch/mips/jz4740/clock-debugfs.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/mips/jz4740/clock-debugfs.c b/arch/mips/jz4740/clock-debugfs.c
index a8acdef..325422d0 100644
--- a/arch/mips/jz4740/clock-debugfs.c
+++ b/arch/mips/jz4740/clock-debugfs.c
@@ -87,8 +87,7 @@ void jz4740_clock_debugfs_add_clk(struct clk *clk)
  /* TODO: Locking */
  void jz4740_clock_debugfs_update_parent(struct clk *clk)
  {
-       if (clk->debugfs_parent_entry)
-               debugfs_remove(clk->debugfs_parent_entry);
+       debugfs_remove(clk->debugfs_parent_entry);

        if (clk->parent) {
                char parent_path[100];



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