lkml.org 
[lkml]   [2017]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 5/5] mtip32xx: Adjust an input validation check in mtip_hw_debugfs_exit()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 6 Aug 2017 20:52:26 +0200

The script "checkpatch.pl" pointed information out like the following.

WARNING: debugfs_remove_recursive(NULL) is safe and this check is probably not required

Thus adjust this source code place.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/block/mtip32xx/mtip32xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 18e634efed95..db37ff872d56 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -2572,7 +2572,7 @@ static int mtip_hw_debugfs_init(struct driver_data *dd)

static void mtip_hw_debugfs_exit(struct driver_data *dd)
{
- if (dd->dfs_node)
+ if (dd)
debugfs_remove_recursive(dd->dfs_node);
}

--
2.13.4
\
 
 \ /
  Last update: 2017-08-06 21:25    [W:0.121 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site