hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mmc/host/wbsd.c
....@@ -1703,7 +1703,15 @@
17031703 */
17041704 wbsd_init_device(host);
17051705
1706
- mmc_add_host(mmc);
1706
+ ret = mmc_add_host(mmc);
1707
+ if (ret) {
1708
+ if (!pnp)
1709
+ wbsd_chip_poweroff(host);
1710
+
1711
+ wbsd_release_resources(host);
1712
+ wbsd_free_mmc(dev);
1713
+ return ret;
1714
+ }
17071715
17081716 pr_info("%s: W83L51xD", mmc_hostname(mmc));
17091717 if (host->chip_id != 0)