Module Name:    src
Committed By:   riastradh
Date:           Mon Aug 27 14:40:13 UTC 2018

Modified Files:
        src/sys/external/bsd/drm2/linux: linux_fence.c

Log Message:
Linux fence_put accepts NULL as noop.  Match this.

>From mrg@.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/linux/linux_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_fence.c
diff -u src/sys/external/bsd/drm2/linux/linux_fence.c:1.7 src/sys/external/bsd/drm2/linux/linux_fence.c:1.8
--- src/sys/external/bsd/drm2/linux/linux_fence.c:1.7	Mon Aug 27 14:20:41 2018
+++ src/sys/external/bsd/drm2/linux/linux_fence.c	Mon Aug 27 14:40:13 2018
@@ -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 @@ void
 fence_put(struct fence *fence)
 {
 
+	if (fence == NULL)
+		return;
 	KASSERT(fence_referenced_p(fence));
 	kref_put(&fence->refcount, &fence_release);
 }

Reply via email to