aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorArnd Hannemann <arnd@arndnet.de>2010-12-19 16:16:07 -0500
committerChris Ball <cjb@laptop.org>2011-01-08 23:52:29 -0500
commiteba46030e1727f2af377300b6a55df846fa830f1 (patch)
tree014a009a8bea602a4ad6a4f7d09d4af6961bfb95 /drivers/mmc
parent93173054f2979de41b1912b19f0b57edfb35fcdc (diff)
mmc: tmio_mmc: silence compiler warnings
with "mmc: tmio: implement a bounce buffer for unaligned DMA" gcc generates the following warnings: drivers/mmc/host/tmio_mmc.c:654:6: warning: 'ret' may be used uninitialized in this function drivers/mmc/host/tmio_mmc.c:730:6: warning: 'ret' may be used uninitialized in this function This patch fixes these by setting ret to -EINVAL in the affected code paths. Signed-off-by: Arnd Hannemann <arnd@arndnet.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/tmio_mmc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 595b7b3f160d..f442c8205b0a 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -673,8 +673,10 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host)
673 } 673 }
674 674
675 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE || 675 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE ||
676 align >= MAX_ALIGN)) || !multiple) 676 align >= MAX_ALIGN)) || !multiple) {
677 ret = -EINVAL;
677 goto pio; 678 goto pio;
679 }
678 680
679 /* The only sg element can be unaligned, use our bounce buffer then */ 681 /* The only sg element can be unaligned, use our bounce buffer then */
680 if (!aligned) { 682 if (!aligned) {
@@ -748,8 +750,10 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host)
748 } 750 }
749 751
750 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE || 752 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE ||
751 align >= MAX_ALIGN)) || !multiple) 753 align >= MAX_ALIGN)) || !multiple) {
754 ret = -EINVAL;
752 goto pio; 755 goto pio;
756 }
753 757
754 /* The only sg element can be unaligned, use our bounce buffer then */ 758 /* The only sg element can be unaligned, use our bounce buffer then */
755 if (!aligned) { 759 if (!aligned) {