mmc: wbsd: fix double mmc_free_host() in wbsd_init()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 7 Aug 2023 12:44:42 +0000 (20:44 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 9 Aug 2023 10:27:36 +0000 (12:27 +0200)
mmc_free_host() has already be called in wbsd_free_mmc(),
remove the mmc_free_host() in error path in wbsd_init().

Fixes: dc5b9b50fc9d ("mmc: wbsd: fix return value check of mmc_add_host()")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230807124443.3431366-1-yangyingliang@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/wbsd.c

index 521af9251f33595613f73862dbf395cd886c713c..bf2a92fba0ed81cb347b6c95693223254e51b6ff 100644 (file)
@@ -1705,8 +1705,6 @@ static int wbsd_init(struct device *dev, int base, int irq, int dma,
 
                wbsd_release_resources(host);
                wbsd_free_mmc(dev);
-
-               mmc_free_host(mmc);
                return ret;
        }