]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmc: core: Fix error paths for UHS-II card init and re-init
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 29 Oct 2024 13:17:49 +0000 (14:17 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Oct 2024 11:02:15 +0000 (12:02 +0100)
commit88df25ad0c5afbafe42fab023fc9b0e688f4b4e1
treee7cd726177af408384d78cd6ff7742e8506c4d0a
parent7acbd2da48faee6ff856b2322c799d5c7b144d52
mmc: core: Fix error paths for UHS-II card init and re-init

The error path didn't manage the removal of the allocated mmc_card
correctly. Let's fix this to avoid potential memory leaks.

While at it, move the assignment of host->card to slightly later in the
init process and drop also a somewhat silly dev_warn() when CMD8 fails.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241029131752.226764-4-ulf.hansson@linaro.org>
drivers/mmc/core/sd_uhs2.c