]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: mmci: stm32: correctly check all elements of sg list
authorYann Gautier <yann.gautier@foss.st.com>
Thu, 17 Mar 2022 11:19:43 +0000 (12:19 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 4 Apr 2022 10:17:46 +0000 (12:17 +0200)
commitf50ac6813bff038fb3468394f9ca1bc2189443db
treecfec33f3c07e04e848e4253a7bafffa55330f244
parenteb58eaf19acdfb5585c4814a07440e16018578ce
mmc: mmci: stm32: correctly check all elements of sg list

Use sg and not data->sg when checking sg list elements. Else only the
first element alignment is checked.
The last element should be checked the same way, for_each_sg already set
sg to sg_next(sg).

Fixes: 4c45278ef09b ("mmc: mmci: add stm32 sdmmc variant")
Cc: stable@vger.kernel.org
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Link: https://lore.kernel.org/r/20220317111944.116148-2-yann.gautier@foss.st.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mmci_stm32_sdmmc.c