From 3118c926c6e62291f07218a5aa8ea21c77fd5c0c Mon Sep 17 00:00:00 2001 From: Maureen Helm Date: Thu, 14 Nov 2019 10:19:08 -0600 Subject: [PATCH] disk: sdhc: Remove logically dead code from spi sdhc driver We already returned out of the function if err is nonzero, therefore it is impossible to reach this return statement. Coverity-CID: 205612 Signed-off-by: Maureen Helm --- subsys/disk/disk_access_spi_sdhc.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/subsys/disk/disk_access_spi_sdhc.c b/subsys/disk/disk_access_spi_sdhc.c index aa322e00e73..50adc8832ab 100644 --- a/subsys/disk/disk_access_spi_sdhc.c +++ b/subsys/disk/disk_access_spi_sdhc.c @@ -563,11 +563,6 @@ static int sdhc_spi_detect(struct sdhc_spi_data *data) break; } } while (sdhc_retry_ok(&retry)); - - if (err != 0) { - /* Card never finished power-up */ - return -ETIMEDOUT; - } } if ((ocr & SDHC_CCS) != 0U) {