From: Dave Airlie Date: Fri, 22 Dec 2023 04:31:58 +0000 (+1000) Subject: nouveau/gsp: always free the alloc messages on r535 X-Git-Tag: v6.7-pxa1908~51^2~2 X-Git-Url: https://git.dujemihanovic.xyz/?a=commitdiff_plain;h=9c9dd22ba5d747cceee3d1b1757448b5c48ac705;p=linux.git nouveau/gsp: always free the alloc messages on r535 Fixes a memory leak seen with kmemleak. Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-10-airlied@gmail.com --- diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c index 642ce0dd0faf..9ee58e2a0eb2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c @@ -605,8 +605,7 @@ r535_gsp_rpc_rm_alloc_push(struct nvkm_gsp_object *object, void *argv, u32 repc) ret = repc ? rpc->params : NULL; } - if (ret) - nvkm_gsp_rpc_done(gsp, rpc); + nvkm_gsp_rpc_done(gsp, rpc); return ret; }