Staging: slicoss: Removal of if check since debugfs_remove(NULL) is safe
authorRashika Kheria <rashika.kheria@gmail.com>
Sat, 19 Oct 2013 07:43:36 +0000 (13:13 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Oct 2013 21:45:08 +0000 (14:45 -0700)
This patch fixes the following checkpatch.pl warning in slicoss.c:
WARNING: debugfs_remove(NULL) is safe this check is probably not
required

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/slicoss/slicoss.c

index b6eb5df7a4269b681990ae320ca322fc934d30e3..363f7b37dd545935e8e811a4681b276cf74fffe7 100644 (file)
@@ -2231,14 +2231,8 @@ static void slic_debug_card_destroy(struct sliccard *card)
                if (adapter)
                        slic_debug_adapter_destroy(adapter);
        }
-       if (card->debugfs_cardinfo) {
-               debugfs_remove(card->debugfs_cardinfo);
-               card->debugfs_cardinfo = NULL;
-       }
-       if (card->debugfs_dir) {
-               debugfs_remove(card->debugfs_dir);
-               card->debugfs_dir = NULL;
-       }
+       debugfs_remove(card->debugfs_cardinfo);
+       debugfs_remove(card->debugfs_dir);
 }
 
 static void slic_debug_init(void)
@@ -2256,10 +2250,7 @@ static void slic_debug_init(void)
 
 static void slic_debug_cleanup(void)
 {
-       if (slic_debugfs) {
-               debugfs_remove(slic_debugfs);
-               slic_debugfs = NULL;
-       }
+       debugfs_remove(slic_debugfs);
 }
 
 /*