scsi: csiostor: Fix NULL check before debugfs_remove_recursive

debugfs_remove_recursive() has taken the null pointer into account.  Remove
the null check before debugfs_remove_recursive().

Link: https://lore.kernel.org/r/20191026195625.GA22455@saurav
Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Saurav Girepunje 2019-10-27 01:26:30 +05:30 committed by Martin K. Petersen
parent 62fb8b34be
commit 75a740e6e8

View File

@ -157,8 +157,7 @@ csio_dfs_create(struct csio_hw *hw)
static int static int
csio_dfs_destroy(struct csio_hw *hw) csio_dfs_destroy(struct csio_hw *hw)
{ {
if (hw->debugfs_root) debugfs_remove_recursive(hw->debugfs_root);
debugfs_remove_recursive(hw->debugfs_root);
return 0; return 0;
} }