https://github.com/torvalds/linux
Revision cf4c9d2ac1e42c7d18b921bec39486896645b714 authored by Yang Yingliang on 31 January 2023, 01:38:35 UTC, committed by Ulf Hansson on 13 February 2023, 23:09:17 UTC
If mmc_add_host() fails, it doesn't need to call mmc_remove_host(),
or it will cause null-ptr-deref, because of deleting a not added
device in mmc_remove_host().

To fix this, goto label 'fail_glue_init', if mmc_add_host() fails,
and change the label 'fail_add_host' to 'fail_gpiod_request'.

Fixes: 15a0580ced08 ("mmc_spi host driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Cc:stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230131013835.3564011-1-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 605d9fb
History
Tip revision: cf4c9d2ac1e42c7d18b921bec39486896645b714 authored by Yang Yingliang on 31 January 2023, 01:38:35 UTC
mmc: mmc_spi: fix error handling in mmc_spi_probe()
Tip revision: cf4c9d2
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
rust
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 20.0 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 151 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 2.0 KB
.mailmap -rw-r--r-- 24.8 KB
.rustfmt.toml -rw-r--r-- 369 bytes
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 99.3 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 681.7 KB
Makefile -rw-r--r-- 70.2 KB
README -rw-r--r-- 727 bytes

README

back to top