drm/nouveau/acr: refuse to load LSFW if HSFW is missing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Ben Skeggs 2020-06-16 11:38:47 +10:00
parent 8140f92c27
commit 8fdc45e4b6

View File

@ -60,7 +60,7 @@ nvkm_acr_lsfw_add(const struct nvkm_acr_lsf_func *func, struct nvkm_acr *acr,
{
struct nvkm_acr_lsfw *lsfw;
if (!acr)
if (!acr || list_empty(&acr->hsfw))
return ERR_PTR(-ENOSYS);
lsfw = nvkm_acr_lsfw_get(acr, id);