diff options
author | Christian König <christian.koenig@amd.com> | 2014-07-22 05:30:43 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-07-22 12:21:58 -0400 |
commit | 5b7532756382cb31748f73df6a0af0138390c04f (patch) | |
tree | 5ff283926533f36ad983a67fa3de295b59b1775e /drivers/gpu | |
parent | ec8a362f2e6e380e7a1f66a6c9a7f6c237ab3520 (diff) |
drm/radeon: fix error handling in radeon_vm_bo_set_addr
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_vm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c index fa41e0d7d17d..725d3669014f 100644 --- a/drivers/gpu/drm/radeon/radeon_vm.c +++ b/drivers/gpu/drm/radeon/radeon_vm.c | |||
@@ -472,6 +472,10 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev, | |||
472 | if (bo_va->soffset) { | 472 | if (bo_va->soffset) { |
473 | /* add a clone of the bo_va to clear the old address */ | 473 | /* add a clone of the bo_va to clear the old address */ |
474 | tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL); | 474 | tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL); |
475 | if (!tmp) { | ||
476 | mutex_unlock(&vm->mutex); | ||
477 | return -ENOMEM; | ||
478 | } | ||
475 | tmp->soffset = bo_va->soffset; | 479 | tmp->soffset = bo_va->soffset; |
476 | tmp->eoffset = bo_va->eoffset; | 480 | tmp->eoffset = bo_va->eoffset; |
477 | tmp->vm = vm; | 481 | tmp->vm = vm; |