diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index 737ad1b1..e046152d 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c | |||
@@ -245,7 +245,8 @@ int gk20a_fence_from_semaphore( | |||
245 | gk20a_init_fence(f, &gk20a_semaphore_fence_ops, sync_fence, wfi); | 245 | gk20a_init_fence(f, &gk20a_semaphore_fence_ops, sync_fence, wfi); |
246 | if (!f) { | 246 | if (!f) { |
247 | #ifdef CONFIG_SYNC | 247 | #ifdef CONFIG_SYNC |
248 | sync_fence_put(sync_fence); | 248 | if (sync_fence) |
249 | sync_fence_put(sync_fence); | ||
249 | #endif | 250 | #endif |
250 | return -EINVAL; | 251 | return -EINVAL; |
251 | } | 252 | } |