mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-12 03:26:26 +00:00
au1xmmc: abort requests early if no card is present.
Don't process an MMC request if no card is present. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
This commit is contained in:
parent
5c0a889df5
commit
88b8d9a834
1 changed files with 7 additions and 0 deletions
|
@ -697,6 +697,13 @@ static void au1xmmc_request(struct mmc_host* mmc, struct mmc_request* mrq)
|
||||||
host->mrq = mrq;
|
host->mrq = mrq;
|
||||||
host->status = HOST_S_CMD;
|
host->status = HOST_S_CMD;
|
||||||
|
|
||||||
|
/* fail request immediately if no card is present */
|
||||||
|
if (0 == au1xmmc_card_inserted(host)) {
|
||||||
|
mrq->cmd->error = -ENOMEDIUM;
|
||||||
|
au1xmmc_finish_request(host);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mrq->data) {
|
if (mrq->data) {
|
||||||
FLUSH_FIFO(host);
|
FLUSH_FIFO(host);
|
||||||
ret = au1xmmc_prepare_data(host, mrq->data);
|
ret = au1xmmc_prepare_data(host, mrq->data);
|
||||||
|
|
Loading…
Reference in a new issue