diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-01-31 04:38:35 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2023-02-14 02:09:17 +0300 |
commit | cf4c9d2ac1e42c7d18b921bec39486896645b714 (patch) | |
tree | 8c361b2f433b39604f46ad5c145e9b2730e67e8f /drivers/mmc/host/jz4740_mmc.c | |
parent | 605d9fb9556f8f5fb4566f4df1480f280f308ded (diff) | |
download | linux-cf4c9d2ac1e42c7d18b921bec39486896645b714.tar.xz |
mmc: mmc_spi: fix error handling in mmc_spi_probe()
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>
Diffstat (limited to 'drivers/mmc/host/jz4740_mmc.c')
0 files changed, 0 insertions, 0 deletions