diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 17e13621fae9..e203e5561107 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |||
| @@ -60,6 +60,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev, struct amdgpu_ctx *ctx) | |||
| 60 | amd_sched_entity_fini(&adev->rings[j]->sched, | 60 | amd_sched_entity_fini(&adev->rings[j]->sched, |
| 61 | &ctx->rings[j].entity); | 61 | &ctx->rings[j].entity); |
| 62 | kfree(ctx->fences); | 62 | kfree(ctx->fences); |
| 63 | ctx->fences = NULL; | ||
| 63 | return r; | 64 | return r; |
| 64 | } | 65 | } |
| 65 | return 0; | 66 | return 0; |
| @@ -77,6 +78,7 @@ static void amdgpu_ctx_fini(struct amdgpu_ctx *ctx) | |||
| 77 | for (j = 0; j < amdgpu_sched_jobs; ++j) | 78 | for (j = 0; j < amdgpu_sched_jobs; ++j) |
| 78 | fence_put(ctx->rings[i].fences[j]); | 79 | fence_put(ctx->rings[i].fences[j]); |
| 79 | kfree(ctx->fences); | 80 | kfree(ctx->fences); |
| 81 | ctx->fences = NULL; | ||
| 80 | 82 | ||
| 81 | for (i = 0; i < adev->num_rings; i++) | 83 | for (i = 0; i < adev->num_rings; i++) |
| 82 | amd_sched_entity_fini(&adev->rings[i]->sched, | 84 | amd_sched_entity_fini(&adev->rings[i]->sched, |
