summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2026-05-28 15:27:19 -0400
committerDanilo Krummrich <dakr@kernel.org>2026-05-28 22:49:53 +0200
commit18178f2ac176f4b1e1c0555bed9d66b04fdf171e (patch)
tree4899287a22df7570f25693441bd2517d598f0ed6 /drivers/gpu
parent80fa10569b90a1ac6aeb771c5e149c67027f36e8 (diff)
Revert "nouveau/gsp: cleanup IS_ERR_OR_NULL in rm_alloc functions"
This is probably too risky, see the discussion here: https://lists.freedesktop.org/archives/dri-devel/2026-May/570353.html This reverts commit 281fe11c6c4aebc1a1eb9d21eaab7323ee5af979. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Timur Tabi <ttabi@nvidia.com> Link: https://patch.msgid.link/20260528192847.4077458-6-lyude@redhat.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
index ab2bd88eebce..64fed208e4cf 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
@@ -373,7 +373,7 @@ nvkm_gsp_rm_alloc_get(struct nvkm_gsp_object *parent, u32 handle, u32 oclass, u3
object->handle = handle;
argv = gsp->rm->api->alloc->get(object, oclass, argc);
- if (IS_ERR(argv)) {
+ if (IS_ERR_OR_NULL(argv)) {
object->client = NULL;
return argv;
}
@@ -415,8 +415,8 @@ nvkm_gsp_rm_alloc(struct nvkm_gsp_object *parent, u32 handle, u32 oclass, u32 ar
{
void *argv = nvkm_gsp_rm_alloc_get(parent, handle, oclass, argc, object);
- if (IS_ERR(argv))
- return PTR_ERR(argv);
+ if (IS_ERR_OR_NULL(argv))
+ return argv ? PTR_ERR(argv) : -EIO;
return nvkm_gsp_rm_alloc_wr(object, argv);
}