kernel/drivers/mmc/host/pxamci.c
.. .. @@ -763,7 +763,12 @@ 763 763 dev_warn(dev, "gpio_ro and get_ro() both defined\n"); 764 764 } 765 765 766 - mmc_add_host(mmc);766 + ret = mmc_add_host(mmc);767 + if (ret) {768 + if (host->pdata && host->pdata->exit)769 + host->pdata->exit(dev, mmc);770 + goto out;771 + }767 772 768 773 return 0; 769 774