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/ttm drm/ttm: Omit spurious kf...



details:   https://anonhg.NetBSD.org/src/rev/6e7f0499b109
branches:  trunk
changeset: 1028469:6e7f0499b109
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:07:20 2021 +0000

description:
drm/ttm: Omit spurious kfree in global failure branches.

diffstat:

 sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c     |  5 ++---
 sys/external/bsd/drm2/dist/drm/ttm/ttm_memory.c |  8 +++-----
 2 files changed, 5 insertions(+), 8 deletions(-)

diffs (55 lines):

diff -r 114e30cff470 -r 6e7f0499b109 sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c
--- a/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c       Sun Dec 19 11:07:11 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c       Sun Dec 19 11:07:20 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_bo.c,v 1.25 2021/12/19 11:07:04 riastradh Exp $    */
+/*     $NetBSD: ttm_bo.c,v 1.26 2021/12/19 11:07:20 riastradh Exp $    */
 
 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
 /**************************************************************************
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo.c,v 1.25 2021/12/19 11:07:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo.c,v 1.26 2021/12/19 11:07:20 riastradh Exp $");
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
@@ -1656,7 +1656,6 @@
        spin_lock_destroy(&glob->lru_lock);
        mutex_unlock(&ttm_global_mutex);
        mutex_destroy(&ttm_global_mutex);
-       kfree(glob);
        return;
 #endif
 out:
diff -r 114e30cff470 -r 6e7f0499b109 sys/external/bsd/drm2/dist/drm/ttm/ttm_memory.c
--- a/sys/external/bsd/drm2/dist/drm/ttm/ttm_memory.c   Sun Dec 19 11:07:11 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/ttm/ttm_memory.c   Sun Dec 19 11:07:20 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_memory.c,v 1.8 2021/12/19 10:29:08 riastradh Exp $ */
+/*     $NetBSD: ttm_memory.c,v 1.9 2021/12/19 11:07:20 riastradh Exp $ */
 
 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
 /**************************************************************************
@@ -29,7 +29,7 @@
  **************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_memory.c,v 1.8 2021/12/19 10:29:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_memory.c,v 1.9 2021/12/19 11:07:20 riastradh Exp $");
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
@@ -503,9 +503,7 @@
                kobject_put(&zone->kobj);
 #endif
        }
-#ifdef __NetBSD__
-       kfree(glob);
-#else
+#ifndef __NetBSD__
        kobject_del(&glob->kobj);
        kobject_put(&glob->kobj);
 #endif



Home | Main Index | Thread Index | Old Index