diff mbox series

[-next,1/2] mmc: wbsd: fix double mmc_free_host() in wbsd_init()

Message ID 20230807124443.3431366-1-yangyingliang@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next,1/2] mmc: wbsd: fix double mmc_free_host() in wbsd_init() | expand

Commit Message

Yang Yingliang Aug. 7, 2023, 12:44 p.m. UTC
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>
---
 drivers/mmc/host/wbsd.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Ulf Hansson Aug. 9, 2023, 11:34 a.m. UTC | #1
On Mon, 7 Aug 2023 at 14:48, Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> 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>

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/wbsd.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
> index 521af9251f33..bf2a92fba0ed 100644
> --- a/drivers/mmc/host/wbsd.c
> +++ b/drivers/mmc/host/wbsd.c
> @@ -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;
>         }
>
> --
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index 521af9251f33..bf2a92fba0ed 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -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;
 	}