From patchwork Sun Dec 19 21:16:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Hannemann X-Patchwork-Id: 418931 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBJLGvB6006390 for ; Sun, 19 Dec 2010 21:16:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756756Ab0LSVQ4 (ORCPT ); Sun, 19 Dec 2010 16:16:56 -0500 Received: from slowhand.arndnet.de ([88.198.19.76]:34121 "EHLO mail.unitix.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756728Ab0LSVQz (ORCPT ); Sun, 19 Dec 2010 16:16:55 -0500 Received: from kallisto.arndnet.de (80-230.eduroam.RWTH-Aachen.DE [134.61.80.230]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.unitix.de (Postfix) with ESMTP id 8D94513E8D; Sun, 19 Dec 2010 22:16:53 +0100 (CET) From: Arnd Hannemann To: g.liakhovetski@gmx.de, linux-mmc@vger.kernel.org Cc: linux-sh@vger.kernel.org, Ian Molton , Samuel Ortiz , Arnd Hannemann Subject: [PATCH] mmc: tmio_mmc: silence compiler warnings Date: Sun, 19 Dec 2010 21:16:07 +0000 Message-Id: <1292793367-5638-1-git-send-email-arnd@arndnet.de> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: References: Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 19 Dec 2010 21:16:57 +0000 (UTC) diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 57ece9d..61e97d1 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -665,8 +665,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) { @@ -741,8 +743,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) {