Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1710447
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
| Newsgroups | linux.kernel |
| Subject | Re: mtd: nand: use dma_mapping_error to check map errors |
| Date | Sun, 13 Aug 2017 10:00:02 +0200 |
| Message-ID | <udVYu-4kw-7@gated-at.bofh.it> (permalink) |
| References | <ucdPR-1fE-45@gated-at.bofh.it> |
| X-Mailer | Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8BIT |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 30 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Richard Weinberger <richard@nod.at>, David Woodhouse <dwmw2@infradead.org>, Brian Norris <computersforpeace@gmail.com>, Marek Vasut <marek.vasut@gmail.com>, Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Sun, 13 Aug 2017 09:56:48 +0200 |
| X-Original-Message-ID | <20170813095648.4a2a2764@bbrezillon> |
| X-Original-References | <1502202942-23984-1-git-send-email-bianpan2016@163.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1710447 |
Show key headers only | View raw
Le Tue, 8 Aug 2017 22:35:42 +0800, Pan Bian <bianpan2016@163.com> a écrit : > The return value of dma_map_single() should be checked by > dma_mapping_error(). However, in function flctl_dma_fifo0_transfer(), its > return value is checked against NULL, which could result in failures. Applied, thanks. Boris > > Signed-off-by: Pan Bian <bianpan2016@163.com> > --- > drivers/mtd/nand/sh_flctl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c > index 891ac7b..2404d66 100644 > --- a/drivers/mtd/nand/sh_flctl.c > +++ b/drivers/mtd/nand/sh_flctl.c > @@ -411,7 +411,7 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf, > > dma_addr = dma_map_single(chan->device->dev, buf, len, dir); > > - if (dma_addr) > + if (!dma_mapping_error(chan->device->dev, dma_addr)) > desc = dmaengine_prep_slave_single(chan, dma_addr, len, > tr_dir, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); >
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
mtd: nand: use dma_mapping_error to check map errors Pan Bian <bianpan2016@163.com> - 2017-08-08 16:40 +0200 Re: mtd: nand: use dma_mapping_error to check map errors Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-08-13 10:00 +0200
csiph-web