From 9266c13ccad585d44c1246d2ba889a629217827e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 6 May 2021 22:32:06 +0200 Subject: [PATCH] scsi: scsi_debug: Drop if with an always false condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Martin K. Petersen --- drivers/scsi/scsi_debug.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index a5d1633b5bd80..6e2ad003c179e 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, -- 2.39.5