Revert "nouveau/gsp/rm: cleanup remaining IS_ERR_OR_NULL usage"
Subsystems (3)
Lyude Paul
maintainerPATCH 1/1 Revert "nouveau/gsp/rm: cleanup remaining IS_ERR_OR_NULL usage"
This reverts commit 1a80c009e27b42e8c202d4c5dbd9dad9e22af742.
Embarassingly, it seems that I completely missed a pretty big issue this patch causes according to Danilo and Sashiko:
https://lists.freedesktop.org/archives/dri-devel/2026-May/570353.html
Where it seems this causes some machines to segfault during nouveau probe.
So, revert this for the time being.
Signed-off-by Lyude Paul <[email protected]>
--- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/ctrl.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/ctrl.c +1 -1
@@ -42,7 +42,7 @@ r535_gsp_rpc_rm_ctrl_push(struct nvkm_gsp_object *object, void **params, u32 repint ret =0 ; rpc =nvkm_gsp_rpc_push (gsp, rpc,NVKM_GSP_RPC_REPLY_RECV , repc); -if (IS_ERR (rpc)) { +if (IS_ERR_OR_NULL (rpc)) { *params =NULL ;return PTR_ERR (rpc); }
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c +3 -3
@@ -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 (rpc)) +if (IS_ERR_OR_NULL (rpc))return rpc; rpc =r535_gsp_msgq_recv (gsp, gsp_rpc_len, &retries); -if (IS_ERR (rpc)) +if (IS_ERR_OR_NULL (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 (reply)) +if (!IS_ERR_OR_NULL (reply)) repv = reply->data;else repv = reply;
Signature · 1 line
2.54.0