]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: mmc_spi: remove unnecessary check in mmc_spi_setup_data_message()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 21 Aug 2025 12:32:25 +0000 (15:32 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 22 Aug 2025 10:06:20 +0000 (12:06 +0200)
An earlier commit changed the outer if statement from
"if (multiple || write) {" to "if (write) {" so now we know that "write"
is true and no longer need to check.  Delete the unnecessary check.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/aKcR2ea747xkw_it@stanley.mountain
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mmc_spi.c

index 95a32ff29ee166602ab9d9d1dc1c6911f2f36eee..42936e248c5536d80dd6110e6b54902e72cdb3e9 100644 (file)
@@ -566,7 +566,7 @@ mmc_spi_setup_data_message(struct mmc_spi_host *host, bool multiple, bool write)
        if (write) {
                t = &host->early_status;
                memset(t, 0, sizeof(*t));
-               t->len = write ? sizeof(scratch->status) : 1;
+               t->len = sizeof(scratch->status);
                t->tx_buf = host->ones;
                t->rx_buf = scratch->status;
                t->cs_change = 1;