From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvbpZ-0001BS-BE for barebox@lists.infradead.org; Fri, 31 Aug 2018 05:18:50 +0000 Received: by mail-pg1-x542.google.com with SMTP id l63-v6so425336pga.7 for ; Thu, 30 Aug 2018 22:18:39 -0700 (PDT) From: Andrey Smirnov Date: Thu, 30 Aug 2018 22:18:26 -0700 Message-Id: <20180831051826.13587-5-andrew.smirnov@gmail.com> In-Reply-To: <20180831051826.13587-1-andrew.smirnov@gmail.com> References: <20180831051826.13587-1-andrew.smirnov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 5/5] mci: imx-esdhc: Return EFAULT when DMA mapping fails To: barebox@lists.infradead.org Cc: Andrey Smirnov EFAULT seems to be much more appropriate error code for DMA mapping failure Signed-off-by: Andrey Smirnov --- drivers/mci/imx-esdhc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c index 7f2472012..7f2285635 100644 --- a/drivers/mci/imx-esdhc.c +++ b/drivers/mci/imx-esdhc.c @@ -303,7 +303,7 @@ esdhc_send_cmd(struct mci_host *mci, struct mci_cmd *cmd, struct mci_data *data) dma = dma_map_single(host->dev, ptr, num_bytes, dir); if (dma_mapping_error(host->dev, dma)) - return -EIO; + return -EFAULT; } err = esdhc_setup_data(mci, data, dma); -- 2.17.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox