Skip to content

Commit 938a06c

Browse files
committed
drm/nouveau/acr: Abort loading ACR if no firmware was found
This fixes a NULL pointer access inside nvkm_acr_oneinit in case necessary firmware files couldn't be loaded. Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/212 Fixes: 4b569de ("drm/nouveau/acr/ga102: initial support") Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230522201838.1496622-1-kherbst@redhat.com
1 parent c177872 commit 938a06c

File tree

1 file changed

+1
-1
lines changed
  • drivers/gpu/drm/nouveau/nvkm/subdev/acr

1 file changed

+1
-1
lines changed

drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ nvkm_acr_oneinit(struct nvkm_subdev *subdev)
224224
u64 falcons;
225225
int ret, i;
226226

227-
if (list_empty(&acr->hsfw)) {
227+
if (list_empty(&acr->hsfw) || !acr->func || !acr->func->wpr_layout) {
228228
nvkm_debug(subdev, "No HSFW(s)\n");
229229
nvkm_acr_cleanup(acr);
230230
return 0;

0 commit comments

Comments
 (0)