From: Hongling Zeng Date: Thu, 28 May 2026 06:24:48 +0000 (+0800) Subject: nouveau/gsp: cleanup IS_ERR_OR_NULL in rpc_rd X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=47f15f6cf068c14d1a5054066c445bee23f6047e;p=thirdparty%2Fkernel%2Flinux.git nouveau/gsp: cleanup IS_ERR_OR_NULL in rpc_rd The underlying nvkm_gsp_rpc_get() function returns error pointers, so checking for NULL with IS_ERR_OR_NULL() is redundant. Use IS_ERR() instead. This affects nvkm_gsp_rpc_rd(). Signed-off-by: Hongling Zeng Signed-off-by: Lyude Paul Link: https://patch.msgid.link/20260528062451.54107-3-zenghongling@kylinos.cn Reviewed-by: Lyude Paul --- diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h index ab2bd88eebce5..d771134fa4107 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);