mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 23:52:08 +02:00
drm/nouveau: Fix error pointer dereference in r535_gsp_msgq_recv()
If "rpc" is an error pointer then return directly. Otherwise it leads
to an error pointer dereference.
Fixes: 50f290053d ("drm/nouveau: support handling the return of large GSP message")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/b7052ac0-98e4-433b-ad58-f563bf51858c@stanley.mountain
This commit is contained in:
parent
9b6c03cb96
commit
fdee05235a
|
|
@ -348,6 +348,7 @@ r535_gsp_msgq_recv(struct nvkm_gsp *gsp, u32 gsp_rpc_len, int *retries)
|
|||
if (IS_ERR(buf)) {
|
||||
kvfree(info.gsp_rpc_buf);
|
||||
info.gsp_rpc_buf = NULL;
|
||||
return buf;
|
||||
}
|
||||
|
||||
if (expected <= max_rpc_size)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user