scsi: csiostor: Fix NULL check before debugfs_remove_recursive
authorSaurav Girepunje <saurav.girepunje@gmail.com>
Sat, 26 Oct 2019 19:56:30 +0000 (01:26 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 2 Nov 2019 00:19:11 +0000 (20:19 -0400)
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>
drivers/scsi/csiostor/csio_init.c

index a6dd704..f98f36c 100644 (file)
@@ -157,8 +157,7 @@ csio_dfs_create(struct csio_hw *hw)
 static int
 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;
 }