hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/mmc/host/atmel-mci.c
....@@ -1818,7 +1818,6 @@
18181818 atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY);
18191819 state = STATE_WAITING_NOTBUSY;
18201820 } else if (host->mrq->stop) {
1821
- atmci_writel(host, ATMCI_IER, ATMCI_CMDRDY);
18221821 atmci_send_stop_cmd(host, data);
18231822 state = STATE_SENDING_STOP;
18241823 } else {
....@@ -1851,8 +1850,6 @@
18511850 * command to send.
18521851 */
18531852 if (host->mrq->stop) {
1854
- atmci_writel(host, ATMCI_IER,
1855
- ATMCI_CMDRDY);
18561853 atmci_send_stop_cmd(host, data);
18571854 state = STATE_SENDING_STOP;
18581855 } else {
....@@ -2223,6 +2220,7 @@
22232220 {
22242221 struct mmc_host *mmc;
22252222 struct atmel_mci_slot *slot;
2223
+ int ret;
22262224
22272225 mmc = mmc_alloc_host(sizeof(struct atmel_mci_slot), &host->pdev->dev);
22282226 if (!mmc)
....@@ -2306,11 +2304,13 @@
23062304
23072305 host->slot[id] = slot;
23082306 mmc_regulator_get_supply(mmc);
2309
- mmc_add_host(mmc);
2307
+ ret = mmc_add_host(mmc);
2308
+ if (ret) {
2309
+ mmc_free_host(mmc);
2310
+ return ret;
2311
+ }
23102312
23112313 if (gpio_is_valid(slot->detect_pin)) {
2312
- int ret;
2313
-
23142314 timer_setup(&slot->detect_timer, atmci_detect_change, 0);
23152315
23162316 ret = request_irq(gpio_to_irq(slot->detect_pin),