Commit 0217a889 authored by Rashika Kheria's avatar Rashika Kheria Committed by Greg Kroah-Hartman

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: default avatarRashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f32eca7d
......@@ -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);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment