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 drm: Fix error return for kthrea...



details:   https://anonhg.NetBSD.org/src/rev/c312e0984bdd
branches:  trunk
changeset: 1029011:c312e0984bdd
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:42:48 2021 +0000

description:
drm: Fix error return for kthread_run: error pointer, not null.

diffstat:

 sys/external/bsd/drm2/linux/linux_kthread.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 47900cf685a9 -r c312e0984bdd sys/external/bsd/drm2/linux/linux_kthread.c
--- a/sys/external/bsd/drm2/linux/linux_kthread.c       Sun Dec 19 12:42:40 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_kthread.c       Sun Dec 19 12:42:48 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_kthread.c,v 1.7 2021/12/19 12:42:32 riastradh Exp $      */
+/*     $NetBSD: linux_kthread.c,v 1.8 2021/12/19 12:42:48 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_kthread.c,v 1.7 2021/12/19 12:42:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_kthread.c,v 1.8 2021/12/19 12:42:48 riastradh Exp $");
 
 #include <sys/types.h>
 
@@ -41,6 +41,7 @@
 #include <sys/mutex.h>
 #include <sys/specificdata.h>
 
+#include <linux/err.h>
 #include <linux/kthread.h>
 #include <linux/spinlock.h>
 
@@ -153,7 +154,7 @@
            linux_kthread_start, T, &T->kt_lwp, "%s", name);
        if (error) {
                kthread_free(T);
-               T = NULL;
+               return ERR_PTR(-error); /* XXX errno NetBSD->Linux */
        }
 
        return T;



Home | Main Index | Thread Index | Old Index