]> git.ipfire.org Git - thirdparty/u-boot.git/commit
mmc: Take cleanup path to free memory on error exit
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 3 Jul 2025 14:03:30 +0000 (15:03 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 17 Jul 2025 17:39:06 +0000 (11:39 -0600)
commit1d2723731b41be97fdc56acb68e075f752fd2f2a
treee7577807d38939493ea012784f45be7f750a7ce6
parent3b4604a40b9fd61b87e9d059fc56f04d36f1a380
mmc: Take cleanup path to free memory on error exit

Instead of returning -EINVAL directly which will not call the cleanup
path to free memory, fix the code to set the error and then goto the
cleanup code.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/mmc.c