mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
mmc: rtsx_usb_sdmmc: Fix error-path in sd_set_power_mode()
[ Upstream commit 47a255f7d2eabee06cfbf5b1c2379749442fd01d ] In the error path of sd_set_power_mode() we don't update host->power_mode, which could lead to an imbalance of the runtime PM usage count. Fix this by always updating host->power_mode. Reviewed-by: Avri Altman <avri.altman@sandisk.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Ricky Wu <ricky_wu@realtek.com> Link: https://lore.kernel.org/r/20250610111633.504366-2-ulf.hansson@linaro.org Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
36bfbdadd6
commit
a35952fbe2
1 changed files with 1 additions and 3 deletions
|
|
@ -1038,9 +1038,7 @@ static int sd_set_power_mode(struct rtsx_usb_sdmmc *host,
|
|||
err = sd_power_on(host);
|
||||
}
|
||||
|
||||
if (!err)
|
||||
host->power_mode = power_mode;
|
||||
|
||||
host->power_mode = power_mode;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue