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/dist/drm drm: Fix type confusion in dr...
details: https://anonhg.NetBSD.org/src/rev/509a08ca9af1
branches: trunk
changeset: 1028662:509a08ca9af1
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:37:23 2021 +0000
description:
drm: Fix type confusion in drm_prime_lookup_buf_by_handle.
diffstat:
sys/external/bsd/drm2/dist/drm/drm_prime.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 73e1165b1922 -r 509a08ca9af1 sys/external/bsd/drm2/dist/drm/drm_prime.c
--- a/sys/external/bsd/drm2/dist/drm/drm_prime.c Sun Dec 19 11:37:14 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_prime.c Sun Dec 19 11:37:23 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_prime.c,v 1.18 2021/12/19 11:36:25 riastradh Exp $ */
+/* $NetBSD: drm_prime.c,v 1.19 2021/12/19 11:37:23 riastradh Exp $ */
/*
* Copyright © 2012 Red Hat
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_prime.c,v 1.18 2021/12/19 11:36:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_prime.c,v 1.19 2021/12/19 11:37:23 riastradh Exp $");
#include <linux/export.h>
#include <linux/dma-buf.h>
@@ -243,7 +243,12 @@
uint32_t handle)
{
#ifdef __NetBSD__
- return rb_tree_find_node(&prime_fpriv->handles.rbr_tree, &handle);
+ struct drm_prime_member *member;
+
+ member = rb_tree_find_node(&prime_fpriv->handles.rbr_tree, &handle);
+ if (member == NULL)
+ return NULL;
+ return member->dma_buf;
#else
struct rb_node *rb;
Home |
Main Index |
Thread Index |
Old Index