diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index d19479a2..c8434f3d 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c | |||
@@ -155,6 +155,8 @@ __releases(&cde_app->mutex) | |||
155 | nvgpu_mutex_acquire(&cde_app->mutex); | 155 | nvgpu_mutex_acquire(&cde_app->mutex); |
156 | gk20a_cde_stop(g); | 156 | gk20a_cde_stop(g); |
157 | nvgpu_mutex_release(&cde_app->mutex); | 157 | nvgpu_mutex_release(&cde_app->mutex); |
158 | |||
159 | nvgpu_mutex_destroy(&cde_app->mutex); | ||
158 | } | 160 | } |
159 | 161 | ||
160 | void gk20a_cde_suspend(struct gk20a *g) | 162 | void gk20a_cde_suspend(struct gk20a *g) |
@@ -1301,7 +1303,10 @@ __releases(&cde_app->mutex) | |||
1301 | 1303 | ||
1302 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_cde_ctx, "cde: init"); | 1304 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_cde_ctx, "cde: init"); |
1303 | 1305 | ||
1304 | nvgpu_mutex_init(&cde_app->mutex); | 1306 | err = nvgpu_mutex_init(&cde_app->mutex); |
1307 | if (err) | ||
1308 | return err; | ||
1309 | |||
1305 | nvgpu_mutex_acquire(&cde_app->mutex); | 1310 | nvgpu_mutex_acquire(&cde_app->mutex); |
1306 | 1311 | ||
1307 | INIT_LIST_HEAD(&cde_app->free_contexts); | 1312 | INIT_LIST_HEAD(&cde_app->free_contexts); |
@@ -1316,6 +1321,10 @@ __releases(&cde_app->mutex) | |||
1316 | 1321 | ||
1317 | nvgpu_mutex_release(&cde_app->mutex); | 1322 | nvgpu_mutex_release(&cde_app->mutex); |
1318 | gk20a_dbg(gpu_dbg_cde_ctx, "cde: init finished: %d", err); | 1323 | gk20a_dbg(gpu_dbg_cde_ctx, "cde: init finished: %d", err); |
1324 | |||
1325 | if (err) | ||
1326 | nvgpu_mutex_destroy(&cde_app->mutex); | ||
1327 | |||
1319 | return err; | 1328 | return err; |
1320 | } | 1329 | } |
1321 | 1330 | ||