]> git.itanic.dy.fi Git - linux-stable/commit
scsi: scsi_debug: Delete some bogus error checking
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 6 Nov 2023 14:05:04 +0000 (17:05 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 9 Nov 2023 02:42:26 +0000 (21:42 -0500)
commit037fbd3fcfbd99145f9310d93f6637012807cfd0
tree0c15ba0bbd0f432e90e9be89067bd871afd3a065
parent860c3d03bbc3f17aef8600662c488f27fd093142
scsi: scsi_debug: Delete some bogus error checking

Smatch complains that "dentry" is never initialized.  These days everyone
initializes all their stack variables to zero so this means that it will
trigger a warning every time this function is run.

Really, debugfs functions are not supposed to be checked for errors in
normal code.  For example, if we updated this code to check the correct
variable then it would print a warning if CONFIG_DEBUGFS was disabled.  We
don't want that.  Just delete the check.

Fixes: f084fe52c640 ("scsi: scsi_debug: Add debugfs interface to fail target reset")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/c602c9ad-5e35-4e18-a47f-87ed956a9ec2@moroto.mountain
Reviewed-by: Wenchao Hao <haowenchao2@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c