From: Matthew R. Ochs Date: Fri, 25 Aug 2017 22:17:53 +0000 (-0500) Subject: scsi: cxlflash: Remove unnecessary existence check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=48a17ad5931c3832eec68411620bc3527021c193;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scsi: cxlflash: Remove unnecessary existence check The AFU termination sequence has been refactored over time such that the main tear down routine, term_afu(), can no longer can be invoked with a NULL AFU pointer. Remove the unnecessary existence check from term_afu(). Signed-off-by: Matthew R. Ochs Signed-off-by: Uma Krishnan Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 6a4367cc9caa..76b8b7eed0c0 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c @@ -820,8 +820,7 @@ static void term_afu(struct cxlflash_cfg *cfg) for (k = cfg->afu->num_hwqs - 1; k >= 0; k--) term_intr(cfg, UNMAP_THREE, k); - if (cfg->afu) - stop_afu(cfg); + stop_afu(cfg); for (k = cfg->afu->num_hwqs - 1; k >= 0; k--) term_mc(cfg, k);