X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fmmc%2Fhost%2Fsdhci.c;h=cf01b6f94d7f665d83d2eaad75d9d5fcbb95e541;hb=49036ba889e346da6ebf2f741fe0b0ee49a11b08;hp=6aaf5c3ce34c53c71e5d770562fc7b382f134cee;hpb=2f2b73a29d2aabf5ad0150856c3e5cb6e04dcfc1;p=linux-2.6-microblaze.git diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 6aaf5c3ce34c..cf01b6f94d7f 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -4072,9 +4072,13 @@ static void sdhci_allocate_bounce_buffer(struct sdhci_host *host) bounce_size, DMA_BIDIRECTIONAL); ret = dma_mapping_error(mmc_dev(mmc), host->bounce_addr); - if (ret) + if (ret) { + devm_kfree(mmc_dev(mmc), host->bounce_buffer); + host->bounce_buffer = NULL; /* Again fall back to max_segs == 1 */ return; + } + host->bounce_buffer_size = bounce_size; /* Lie about this since we're bouncing */