]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:41:13 +0000 (14:41 +0200)
commit73d0b2d6d402d9961da7ac76ced87c5d103bb540
tree2677bae404c7892acdd171777296602e4eaff55b
parent019201fd31063f701a081a6d81bb7ae44ff9a50a
mmc: mmci: stm32: correctly check all elements of sg list

BugLink: https://bugs.launchpad.net/bugs/1969107
commit 0d319dd5a27183b75d984e3dc495248e59f99334 upstream.

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: 46b723dd867d ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 11497ecbda04e0b9a1fdb66de5df8e4e58c0c1bd)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/mmc/host/mmci_stm32_sdmmc.c