From 5af3c935e5893c4f00a5938811763f9010556c5f Mon Sep 17 00:00:00 2001 From: Arnd Hannemann Date: Sun, 19 Dec 2010 21:16:07 +0000 Subject: [PATCH] --- yaml --- r: 228919 b: refs/heads/master c: eba46030e1727f2af377300b6a55df846fa830f1 h: refs/heads/master i: 228917: f311b5f553b2f256a03f5096db02f43574c329b3 228915: 6ac8c4c1a684ef7156d32786ccaf40d35d78f468 228911: 85cdaa6697ec3696b2e39c5caedc426fd9f4ad53 v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/tmio_mmc.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 557afb947e20..2f493478ddd2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 93173054f2979de41b1912b19f0b57edfb35fcdc +refs/heads/master: eba46030e1727f2af377300b6a55df846fa830f1 diff --git a/trunk/drivers/mmc/host/tmio_mmc.c b/trunk/drivers/mmc/host/tmio_mmc.c index 595b7b3f160d..f442c8205b0a 100644 --- a/trunk/drivers/mmc/host/tmio_mmc.c +++ b/trunk/drivers/mmc/host/tmio_mmc.c @@ -673,8 +673,10 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host) } if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE || - align >= MAX_ALIGN)) || !multiple) + align >= MAX_ALIGN)) || !multiple) { + ret = -EINVAL; goto pio; + } /* The only sg element can be unaligned, use our bounce buffer then */ if (!aligned) { @@ -748,8 +750,10 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host) } if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE || - align >= MAX_ALIGN)) || !multiple) + align >= MAX_ALIGN)) || !multiple) { + ret = -EINVAL; goto pio; + } /* The only sg element can be unaligned, use our bounce buffer then */ if (!aligned) {