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. diff --git a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c index 213808ce46d4..47fbca2776a7 100644 --- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c +++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c @@ -487,6 +487,10 @@ nvkm_ioctl(struct nvkm_client *client, bool supervisor, client->data = NULL; } } +#ifdef __NetBSD__ + else + ret = 0; +#endif return ret; }