Home
last modified time | relevance | path

Searched hist:f670744a (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/mmc/host/
H A Dtoshsd.cf670744a Tue Nov 01 01:30:21 CDT 2022 Yang Yingliang <yangyingliang@huawei.com> mmc: toshsd: fix return value check of mmc_add_host()

mmc_add_host() may return error, if we ignore its return value, the memory
that allocated in mmc_alloc_host() will be leaked and it will lead a kernel
crash because of deleting not added device in the remove path.

So fix this by checking the return value and goto error path which will call
mmc_free_host(), besides, free_irq() also needs be called.

Fixes: a5eb8bbd66cc ("mmc: add Toshiba PCI SD controller driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221101063023.1664968-8-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>