]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nouveau/gsp/rm: cleanup remaining IS_ERR_OR_NULL usage
authorHongling Zeng <zenghongling@kylinos.cn>
Thu, 28 May 2026 06:24:51 +0000 (14:24 +0800)
committerLyude Paul <lyude@redhat.com>
Thu, 28 May 2026 16:49:57 +0000 (12:49 -0400)
Clean up the remaining IS_ERR_OR_NULL() checks in ctrl.c and rpc.c.
The underlying functions return error pointers, so IS_ERR() is
sufficient.

This affects:
- r535_gsp_rpc_ctrl() in ctrl.c
- r535_gsp_rpc_ctor() in rpc.c

Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patch.msgid.link/20260528062451.54107-6-zenghongling@kylinos.cn
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/ctrl.c
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c

index 70b9ee911c5e7e905af128296635e08b82d2f445..aa0ebd3dfb17d89ec8b6248f37b00b51e618575e 100644 (file)
@@ -42,7 +42,7 @@ r535_gsp_rpc_rm_ctrl_push(struct nvkm_gsp_object *object, void **params, u32 rep
        int ret = 0;
 
        rpc = nvkm_gsp_rpc_push(gsp, rpc, NVKM_GSP_RPC_REPLY_RECV, repc);
-       if (IS_ERR_OR_NULL(rpc)) {
+       if (IS_ERR(rpc)) {
                *params = NULL;
                return PTR_ERR(rpc);
        }
index 41301f19729cf86800847a1a63d72422328306e1..0c9657cb2dd72a4254db7256e6a32f8b976f7fc6 100644 (file)
@@ -459,11 +459,11 @@ r535_gsp_msg_recv(struct nvkm_gsp *gsp, int fn, u32 gsp_rpc_len)
 
 retry:
        rpc = r535_gsp_msgq_peek(gsp, sizeof(*rpc), &retries);
-       if (IS_ERR_OR_NULL(rpc))
+       if (IS_ERR(rpc))
                return rpc;
 
        rpc = r535_gsp_msgq_recv(gsp, gsp_rpc_len, &retries);
-       if (IS_ERR_OR_NULL(rpc))
+       if (IS_ERR(rpc))
                return rpc;
 
        if (rpc->rpc_result) {
@@ -561,7 +561,7 @@ r535_gsp_rpc_handle_reply(struct nvkm_gsp *gsp, u32 fn,
                break;
        case NVKM_GSP_RPC_REPLY_RECV:
                reply = r535_gsp_msg_recv(gsp, fn, gsp_rpc_len);
-               if (!IS_ERR_OR_NULL(reply))
+               if (!IS_ERR(reply))
                        repv = reply->data;
                else
                        repv = reply;