mm/hwpoison-inject.c: remove unnecessary null test before debugfs_remove_recursive
authorFabian Frederick <fabf@skynet.be>
Wed, 6 Aug 2014 23:06:41 +0000 (16:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Aug 2014 01:01:19 +0000 (18:01 -0700)
Fix checkpatch warning:
  "WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required"

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hwpoison-inject.c

index 95487c71cad59737994d77e1d47c1ff07a7d4365..329caf56df22d84d02495e35f051062b01bdeaba 100644 (file)
@@ -72,8 +72,7 @@ DEFINE_SIMPLE_ATTRIBUTE(unpoison_fops, NULL, hwpoison_unpoison, "%lli\n");
 
 static void pfn_inject_exit(void)
 {
-       if (hwpoison_dir)
-               debugfs_remove_recursive(hwpoison_dir);
+       debugfs_remove_recursive(hwpoison_dir);
 }
 
 static int pfn_inject_init(void)