diff options
author | Christian König <christian.koenig@amd.com> | 2014-07-22 11:30:43 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-07-22 12:21:58 -0400 |
commit | 5b7532756382cb31748f73df6a0af0138390c04f (patch) | |
tree | 5ff283926533f36ad983a67fa3de295b59b1775e | |
parent | ec8a362f2e6e380e7a1f66a6c9a7f6c237ab3520 (diff) | |
download | op-kernel-dev-5b7532756382cb31748f73df6a0af0138390c04f.zip op-kernel-dev-5b7532756382cb31748f73df6a0af0138390c04f.tar.gz |
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>
-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 fa41e0d..725d366 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, if (bo_va->soffset) { /* add a clone of the bo_va to clear the old address */ tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL); + if (!tmp) { + mutex_unlock(&vm->mutex); + return -ENOMEM; + } tmp->soffset = bo_va->soffset; tmp->eoffset = bo_va->eoffset; tmp->vm = vm; |