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 Linux fence_put accepts NULL as ...



details:   https://anonhg.NetBSD.org/src/rev/2973b0f44cdf
branches:  trunk
changeset: 992986:2973b0f44cdf
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:40:13 2018 +0000

description:
Linux fence_put accepts NULL as noop.  Match this.

>From mrg@.

diffstat:

 sys/external/bsd/drm2/linux/linux_fence.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r dc992c5c104d -r 2973b0f44cdf sys/external/bsd/drm2/linux/linux_fence.c
--- a/sys/external/bsd/drm2/linux/linux_fence.c Mon Aug 27 14:39:59 2018 +0000
+++ b/sys/external/bsd/drm2/linux/linux_fence.c Mon Aug 27 14:40:13 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_fence.c,v 1.7 2018/08/27 14:20:41 riastradh Exp $        */
+/*     $NetBSD: linux_fence.c,v 1.8 2018/08/27 14:40:13 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_fence.c,v 1.7 2018/08/27 14:20:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_fence.c,v 1.8 2018/08/27 14:40:13 riastradh Exp $");
 
 #include <sys/atomic.h>
 #include <sys/condvar.h>
@@ -222,6 +222,8 @@
 fence_put(struct fence *fence)
 {
 
+       if (fence == NULL)
+               return;
        KASSERT(fence_referenced_p(fence));
        kref_put(&fence->refcount, &fence_release);
 }



Home | Main Index | Thread Index | Old Index