[PATCH 3/7] nouveau/gsp: cleanup IS_ERR_OR_NULL in rpc_rd

From: Hongling Zeng

Date: Fri May 29 2026 - 00:44:27 EST


The underlying nvkm_gsp_rpc_get() function returns error pointers,
not NULL. This is now documented in the function's kernel-doc comment
(added in previous patch).
Therefore, checking for NULL with IS_ERR_OR_NULL() is redundant and
IS_ERR() is sufficient.

This affects nvkm_gsp_rpc_rd().

Signed-off-by: Hongling Zeng <zenghongling@xxxxxxxxxx>
---
drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
index 64fed208e4cf..a061779e0107 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
@@ -293,7 +293,7 @@ nvkm_gsp_rpc_rd(struct nvkm_gsp *gsp, u32 fn, u32 argc)
{
void *argv = nvkm_gsp_rpc_get(gsp, fn, argc);

- if (IS_ERR_OR_NULL(argv))
+ if (IS_ERR(argv))
return argv;

return nvkm_gsp_rpc_push(gsp, argv, NVKM_GSP_RPC_REPLY_RECV, argc);
--
2.25.1