mmc: wbsd: fix double mmc_free_host() in wbsd_init()
Subsystems (2)
PATCH 1/2 mmc: wbsd: fix double mmc_free_host() in wbsd_init()
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 <[email protected]>
--- drivers/mmc/host/wbsd.c | 2 -- 1 file changed, 2 deletions(-)
drivers/mmc/host/wbsd.c +0 -2
@@ -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; }
Signature · 1 line
2.25.1
PATCH 2/2 mmc: wbsd: remove unnecessary dev_set_drvdata()
Remove unnecessary dev_set_drvdata() in ->remove(), and in error path in ->probe(), the driver_data will be set to NULL in device_unbind_cleanup() in driver core code.
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/mmc/host/wbsd.c | 2 -- 1 file changed, 2 deletions(-)
drivers/mmc/host/wbsd.c +0 -2
@@ -1264,8 +1264,6 @@ static void wbsd_free_mmc(struct device *dev)del_timer_sync (&host->ignore_timer);mmc_free_host (mmc); - -dev_set_drvdata (dev,NULL ); }/*
Signature · 1 line
2.25.1
Quoted 6 lines · Yang Yingliang
mmc_free_host()has already be called inwbsd_free_mmc(), remove themmc_free_host()in error path inwbsd_init().Fixes dc5b9b50fc9d ("mmc: wbsd: fix return value check of mmc_add_host()")Signed-off-by Yang Yingliang <[email protected]>
Applied for fixes and by adding a stable tag, thanks!
Kind regards
Uffe
Quoted 20 lines
--- drivers/mmc/host/wbsd.c | 2 -- 1 file changed, 2 deletions(-)drivers/mmc/host/wbsd.c +0
-3@@ -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