[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130304101142.GJ17833@n2100.arm.linux.org.uk>
Date: Mon, 4 Mar 2013 10:11:42 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Andrew Cooks <acooks@...il.com>
Cc: Dan Williams <djbw@...com>, Vinod Koul <vinod.koul@...el.com>,
Linus Walleij <linus.walleij@...aro.org>,
Jassi Brar <jassisinghbrar@...il.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] check for allocation failure in ioat_dma_self_test
On Mon, Mar 04, 2013 at 04:39:16PM +0800, Andrew Cooks wrote:
> diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
> index 1879a59..1f706c4 100644
> --- a/drivers/dma/ioat/dma.c
> +++ b/drivers/dma/ioat/dma.c
> @@ -832,7 +832,18 @@ int ioat_dma_self_test(struct ioatdma_device *device)
> }
>
> dma_src = dma_map_single(dev, src, IOAT_TEST_SIZE, DMA_TO_DEVICE);
> + err = dma_mapping_error(dev, dma_src);
> + if (err) {
> + dev_err(dev, "dma mapping failed: -%d\n", err);
> + goto free_resources;
> + }
NAK. Please take the time to check what the functions you're using return
rather than assuming what they return.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists