Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/linux Add missing unlock at exit



details:   https://anonhg.NetBSD.org/src/rev/ba9cd4d8d89c
branches:  trunk
changeset: 1028570:ba9cd4d8d89c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:20:56 2021 +0000

description:
Add missing unlock at exit


Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/linux/linux_dma_fence.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a9d0f2325c8a -r ba9cd4d8d89c sys/external/bsd/drm2/linux/linux_dma_fence.c
--- a/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 11:20:49 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_fence.c     Sun Dec 19 11:20:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_dma_fence.c,v 1.16 2021/12/19 11:20:49 riastradh Exp $   */
+/*     $NetBSD: linux_dma_fence.c,v 1.17 2021/12/19 11:20:56 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.16 2021/12/19 11:20:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_fence.c,v 1.17 2021/12/19 11:20:56 riastradh Exp $");
 
 #include <sys/atomic.h>
 #include <sys/condvar.h>
@@ -807,8 +807,10 @@
        spin_lock(fence->lock);
 
        /* Ensure signalling is enabled, or stop if already completed.  */
-       if (dma_fence_ensure_signal_enabled(fence) != 0)
+       if (dma_fence_ensure_signal_enabled(fence) != 0) {
+               spin_unlock(fence->lock);
                return (timeout ? timeout : 1);
+       }
 
        /* If merely polling, stop here.  */
        if (timeout == 0) {



Home | Main Index | Thread Index | Old Index