scsi: cxlflash: Remove unnecessary existence check
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Fri, 25 Aug 2017 22:17:53 +0000 (17:17 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 22:23:06 +0000 (18:23 -0400)
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 <mrochs@linux.vnet.ibm.com>
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxlflash/main.c

index 6a4367cc9caabea8f0bbc1519d309ab50b55578f..76b8b7eed0c03ba160275d0b7ac200d3a67c1ab7 100644 (file)
@@ -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);