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/nouveau nouveau(4): Fix error...
details: https://anonhg.NetBSD.org/src/rev/314c75322a74
branches: trunk
changeset: 366572:314c75322a74
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue May 31 00:17:10 2022 +0000
description:
nouveau(4): Fix error branches in nouveau_gem_new.
PR kern/56804
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r bd6cc05232db -r 314c75322a74 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c Tue May 31 00:01:35 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c Tue May 31 00:17:10 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_gem.c,v 1.13 2021/12/19 10:50:13 riastradh Exp $ */
+/* $NetBSD: nouveau_gem.c,v 1.14 2022/05/31 00:17:10 riastradh Exp $ */
/*
* Copyright (C) 2008 Ben Skeggs.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_gem.c,v 1.13 2021/12/19 10:50:13 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_gem.c,v 1.14 2022/05/31 00:17:10 riastradh Exp $");
#include <asm/uaccess.h>
@@ -202,13 +202,13 @@
* to the caller, instead of a normal nouveau_bo ttm reference. */
ret = drm_gem_object_init(drm->dev, &nvbo->bo.base, size);
if (ret) {
- nouveau_bo_ref(NULL, &nvbo);
+ kfree(nvbo);
return ret;
}
ret = nouveau_bo_init(nvbo, size, align, flags, NULL, NULL);
if (ret) {
- nouveau_bo_ref(NULL, &nvbo);
+ /* XXX note: if this fails it kfrees nvbo */
return ret;
}
Home |
Main Index |
Thread Index |
Old Index