mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-11 11:55:28 +02:00
drm/amdgpu: fix potential resource leak warning
[ Upstream commit 22a5daaec0
]
Clear resource leak warning that when the prepare fails,
the allocated amdgpu job object will never be released.
Signed-off-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
479ccc2132
commit
bc93cfde69
|
@ -102,6 +102,11 @@ static int amdgpu_vm_sdma_prepare(struct amdgpu_vm_update_params *p,
|
||||||
if (!r)
|
if (!r)
|
||||||
r = amdgpu_sync_push_to_job(&sync, p->job);
|
r = amdgpu_sync_push_to_job(&sync, p->job);
|
||||||
amdgpu_sync_free(&sync);
|
amdgpu_sync_free(&sync);
|
||||||
|
|
||||||
|
if (r) {
|
||||||
|
p->num_dw_left = 0;
|
||||||
|
amdgpu_job_free(p->job);
|
||||||
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user