summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_ttm.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-04-06 21:52:19 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-06 22:34:15 -0400
commitc85d6975ef923cffdd56de3e0e6aba0977282cff (patch)
treecb497deea01827951809c9c7c0f1c22780c146be /drivers/gpu/drm/radeon/radeon_ttm.c
parent60302ff631f0f3eac0ec592e128b776f0676b397 (diff)
parentf22e6e847115abc3a0e2ad7bb18d243d42275af1 (diff)
downloadop-kernel-dev-c85d6975ef923cffdd56de3e0e6aba0977282cff.zip
op-kernel-dev-c85d6975ef923cffdd56de3e0e6aba0977282cff.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/mellanox/mlx4/cmd.c net/core/fib_rules.c net/ipv4/fib_frontend.c The fib_rules.c and fib_frontend.c conflicts were locking adjustments in 'net' overlapping addition and removal of code in 'net-next'. The mlx4 conflict was a bug fix in 'net' happening in the same place a constant was being replaced with a more suitable macro. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ttm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index d02aa1d..b292aca 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -598,6 +598,10 @@ static void radeon_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
enum dma_data_direction direction = write ?
DMA_BIDIRECTIONAL : DMA_TO_DEVICE;
+ /* double check that we don't free the table twice */
+ if (!ttm->sg->sgl)
+ return;
+
/* free the sg table and pages again */
dma_unmap_sg(rdev->dev, ttm->sg->sgl, ttm->sg->nents, direction);
OpenPOWER on IntegriCloud