]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mmc: core: Simplify sd_uhs2_power_up()
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 29 Oct 2024 13:17:47 +0000 (14:17 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Oct 2024 10:55:37 +0000 (11:55 +0100)
Drop the redundant err-parameter and just return the result from
host->ops->uhs2_control() instead.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241029131752.226764-2-ulf.hansson@linaro.org>

drivers/mmc/core/sd_uhs2.c

index ddd2291ad7c477a1765792fd57ac073c94cd0ea3..06857e1bbdb0da23fa6b7b63587a3b7c2dfabc81 100644 (file)
@@ -48,8 +48,6 @@ struct sd_uhs2_wait_active_state_data {
 
 static int sd_uhs2_power_up(struct mmc_host *host)
 {
-       int err;
-
        if (host->ios.power_mode == MMC_POWER_ON)
                return 0;
 
@@ -58,9 +56,7 @@ static int sd_uhs2_power_up(struct mmc_host *host)
        host->ios.timing = MMC_TIMING_UHS2_SPEED_A;
        host->ios.power_mode = MMC_POWER_ON;
 
-       err = host->ops->uhs2_control(host, UHS2_SET_IOS);
-
-       return err;
+       return host->ops->uhs2_control(host, UHS2_SET_IOS);
 }
 
 static int sd_uhs2_power_off(struct mmc_host *host)