Module Name: src
Committed By: riastradh
Date: Sun Dec 19 12:40:21 UTC 2021
Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core:
nouveau_nvkm_core_ioctl.c
Log Message:
nouveau: fix a "can return -1 to userland" problem.
nvkm_ioctl_del() for some reason converts 0 into 1 return. this
appears to be a way to avoid having a log printed by nvkm_ioctl()
and to trigger some dead code ("hack" is always NULL afaict.)
after consuming this value convert it back to 0 for ioctl return.
Author: phone <[email protected]>
Committer: Taylor R Campbell <[email protected]>
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.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/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c:1.6 src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c:1.7
--- src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c:1.6 Sun Dec 19 10:51:57 2021
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c Sun Dec 19 12:40:21 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_core_ioctl.c,v 1.6 2021/12/19 10:51:57 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_core_ioctl.c,v 1.7 2021/12/19 12:40:21 riastradh Exp $ */
/*
* Copyright 2014 Red Hat Inc.
@@ -24,7 +24,7 @@
* Authors: Ben Skeggs <[email protected]>
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_ioctl.c,v 1.6 2021/12/19 10:51:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_ioctl.c,v 1.7 2021/12/19 12:40:21 riastradh Exp $");
#include <core/ioctl.h>
#include <core/client.h>
@@ -487,6 +487,10 @@ nvkm_ioctl(struct nvkm_client *client, b
client->data = NULL;
}
}
+#ifdef __NetBSD__
+ else
+ ret = 0;
+#endif
return ret;
}