mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
drm/nouveau/gsp: fix mismatched alloc/free for kvmalloc()
Replace kfree() with kvfree() for memory allocated by kvmalloc().
Compile-tested only.
Cc: stable@vger.kernel.org
Fixes: 8a8b1ec526
("drm/nouveau/gsp: split rpc handling out on its own")
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Timur Tabi <ttabi@nvidia.com>
Acked-by: Zhi Wang <zhiw@nvidia.com>
Link: https://lore.kernel.org/r/20250813125412.96178-1-rongqianfeng@vivo.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
parent
50a8c08b8b
commit
989fe67712
@ -325,7 +325,7 @@ r535_gsp_msgq_recv(struct nvkm_gsp *gsp, u32 gsp_rpc_len, int *retries)
|
|||||||
|
|
||||||
rpc = r535_gsp_msgq_peek(gsp, sizeof(*rpc), info.retries);
|
rpc = r535_gsp_msgq_peek(gsp, sizeof(*rpc), info.retries);
|
||||||
if (IS_ERR_OR_NULL(rpc)) {
|
if (IS_ERR_OR_NULL(rpc)) {
|
||||||
kfree(buf);
|
kvfree(buf);
|
||||||
return rpc;
|
return rpc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -334,7 +334,7 @@ r535_gsp_msgq_recv(struct nvkm_gsp *gsp, u32 gsp_rpc_len, int *retries)
|
|||||||
|
|
||||||
rpc = r535_gsp_msgq_recv_one_elem(gsp, &info);
|
rpc = r535_gsp_msgq_recv_one_elem(gsp, &info);
|
||||||
if (IS_ERR_OR_NULL(rpc)) {
|
if (IS_ERR_OR_NULL(rpc)) {
|
||||||
kfree(buf);
|
kvfree(buf);
|
||||||
return rpc;
|
return rpc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user