summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorRashika Kheria <rashika.kheria@gmail.com>2013-10-19 13:13:36 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-19 14:45:08 -0700
commit0217a889ed62846e61fc0e1ce1300204a04817cb (patch)
tree821acf5d36be64df70587ddbba1bc2c08bb9f526 /drivers/staging
parentf32eca7d6f962a9d8e998dc28a96665a9a7deb78 (diff)
Staging: slicoss: Removal of if check since debugfs_remove(NULL) is safe
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/slicoss/slicoss.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index b6eb5df7a426..363f7b37dd54 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -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);
}
/*