Module Name: src Committed By: riastradh Date: Sun Dec 19 11:20:56 UTC 2021
Modified Files: src/sys/external/bsd/drm2/linux: linux_dma_fence.c Log Message: Add missing unlock at exit Author: Maya Rashish <m...@netbsd.org> Committer: Taylor R Campbell <riastr...@netbsd.org> To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/linux/linux_dma_fence.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/drm2/linux/linux_dma_fence.c diff -u src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.16 src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.17 --- src/sys/external/bsd/drm2/linux/linux_dma_fence.c:1.16 Sun Dec 19 11:20:49 2021 +++ src/sys/external/bsd/drm2/linux/linux_dma_fence.c Sun Dec 19 11:20:56 2021 @@ -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 @@ dma_fence_default_wait(struct dma_fence 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) {