From: Saurav Girepunje Date: Sat, 26 Oct 2019 19:56:30 +0000 (+0530) Subject: scsi: csiostor: Fix NULL check before debugfs_remove_recursive X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=75a740e6e81c89e26a1bd2e628b84131ad90c997;p=linux.git 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 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c index a6dd704d7f2de..f98f36c0d6b75 100644 --- a/drivers/scsi/csiostor/csio_init.c +++ b/drivers/scsi/csiostor/csio_init.c @@ -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; }