]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nouveau/gsp/rm: cleanup WARN_ON(IS_ERR_OR_NULL)
authorHongling Zeng <zenghongling@kylinos.cn>
Thu, 28 May 2026 06:24:50 +0000 (14:24 +0800)
committerLyude Paul <lyude@redhat.com>
Thu, 28 May 2026 16:49:57 +0000 (12:49 -0400)
Replace WARN_ON(IS_ERR_OR_NULL()) with WARN_ON(IS_ERR()) in various
GSP-RM files. The underlying functions return error pointers, so
checking for NULL is redundant.

This affects:
- r535_bar_bar2_update_pde() in bar.c

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

index fae08ac3b18c73ec25ec8fc17d82cfc203724341..9cd68f8622d36e37e2c430e45c87599dad8b8f09 100644 (file)
@@ -55,7 +55,7 @@ r535_bar_bar2_update_pde(struct nvkm_gsp *gsp, u8 page_shift, u64 pdbe)
        rpc_update_bar_pde_v15_00 *rpc;
 
        rpc = nvkm_gsp_rpc_get(gsp, NV_VGPU_MSG_FUNCTION_UPDATE_BAR_PDE, sizeof(*rpc));
-       if (WARN_ON(IS_ERR_OR_NULL(rpc)))
+       if (WARN_ON(IS_ERR(rpc)))
                return -EIO;
 
        rpc->info.barType = NV_RPC_UPDATE_PDE_BAR_2;