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>
This commit is contained in:
Uwe Kleine-König 2021-05-06 22:32:06 +02:00 committed by Martin K. Petersen
parent 9959d45166
commit 8fb82abccc

View File

@ -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,