mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 09:44:18 +08:00
drm/nouveau/acr: return error when registering LSF if ACR not supported
This fixes an oops on TU11x GPUs where SEC2 attempts to register its falcon, and triggers a NULL-pointer deref because ACR isn't yet supported. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
86e18ebd87
commit
1c338ed5e5
@ -58,8 +58,12 @@ struct nvkm_acr_lsfw *
|
||||
nvkm_acr_lsfw_add(const struct nvkm_acr_lsf_func *func, struct nvkm_acr *acr,
|
||||
struct nvkm_falcon *falcon, enum nvkm_acr_lsf_id id)
|
||||
{
|
||||
struct nvkm_acr_lsfw *lsfw = nvkm_acr_lsfw_get(acr, id);
|
||||
struct nvkm_acr_lsfw *lsfw;
|
||||
|
||||
if (!acr)
|
||||
return ERR_PTR(-ENOSYS);
|
||||
|
||||
lsfw = nvkm_acr_lsfw_get(acr, id);
|
||||
if (lsfw && lsfw->func) {
|
||||
nvkm_error(&acr->subdev, "LSFW %d redefined\n", id);
|
||||
return ERR_PTR(-EEXIST);
|
||||
|
Loading…
Reference in New Issue
Block a user