diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-05-06 23:32:06 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-05-15 05:34:31 +0300 |
commit | 8fb82abccc8a4fc25c75bf209da9b2023d064e05 (patch) | |
tree | c62886c381a7a85dc058e9c8605250edb8fa13f8 /drivers/scsi/scsi_debug.c | |
parent | 9959d45166faaa75d9d4bf2ad8b945dfbe9888f8 (diff) | |
download | linux-8fb82abccc8a4fc25c75bf209da9b2023d064e05.tar.xz |
scsi: scsi_debug: Drop if with an always false condition
to_sdebug_host() is a container_of operation, so it never returns NULL.
Link: https://lore.kernel.org/r/20210506203206.254258-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index a5d1633b5bd8..6e2ad003c179 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -7684,11 +7684,6 @@ static int sdebug_driver_remove(struct device *dev) sdbg_host = to_sdebug_host(dev); - if (!sdbg_host) { - pr_err("Unable to locate host info\n"); - return -ENODEV; - } - scsi_remove_host(sdbg_host->shost); list_for_each_entry_safe(sdbg_devinfo, tmp, &sdbg_host->dev_info_list, |