mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: vgpu: Do not overwrite err code on fail
vgpu_vm_alloc_share() wants to return -EINVAL if VMA areas requested do not fulfill the criteria. The error code gets overwritten by a call to vgpu_comm_sendrecv(), which makes vgpu_vm_alloc_share() always return 0. Change-Id: I93f56025f963d1d4ad2f9b06139fce742d3be41b Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1249961 GVS: Gerrit_Virtual_Submit Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
0f58a46904
commit
d09d259d74
@@ -436,8 +436,7 @@ clean_up_share:
|
||||
msg.cmd = TEGRA_VGPU_CMD_AS_FREE_SHARE;
|
||||
msg.handle = vgpu_get_handle(g);
|
||||
p->handle = vm->handle;
|
||||
err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg));
|
||||
WARN_ON(err || msg.ret);
|
||||
WARN_ON(vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)) || msg.ret);
|
||||
clean_up:
|
||||
kfree(vm);
|
||||
as_share->vm = NULL;
|
||||
|
||||
Reference in New Issue
Block a user