]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Aug 2023 13:26:55 +0000 (15:26 +0200)
commit d83035433701919ac6db15f7737cbf554c36c1a6 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/wbsd.c

index f3090216e0dcc8c471589860453259971e8bb7da..6db08070b628d9354b3675e89c5e6270c20a9d8e 100644 (file)
@@ -1710,8 +1710,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;
        }