aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat/dma.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-01-09 12:10:26 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-09 12:13:43 -0800
commita2d6d7ae591c47ebc04926cb29a840adfdde49e6 (patch)
treebe464f987f0ab690481e2783d680aa88574026e4 /drivers/dma/ioat/dma.c
parentMerge branch 'sfc-more-code-refactoring' (diff)
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid (diff)
downloadlinux-dev-a2d6d7ae591c47ebc04926cb29a840adfdde49e6.tar.xz
linux-dev-a2d6d7ae591c47ebc04926cb29a840adfdde49e6.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
The ungrafting from PRIO bug fixes in net, when merged into net-next, merge cleanly but create a build failure. The resolution used here is from Petr Machata. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/dma/ioat/dma.c')
-rw-r--r--drivers/dma/ioat/dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index 1a422a8b43cf..18c011e57592 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -377,10 +377,11 @@ ioat_alloc_ring(struct dma_chan *c, int order, gfp_t flags)
descs->virt = dma_alloc_coherent(to_dev(ioat_chan),
SZ_2M, &descs->hw, flags);
- if (!descs->virt && (i > 0)) {
+ if (!descs->virt) {
int idx;
for (idx = 0; idx < i; idx++) {
+ descs = &ioat_chan->descs[idx];
dma_free_coherent(to_dev(ioat_chan), SZ_2M,
descs->virt, descs->hw);
descs->virt = NULL;