Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
drm/nouveau/acr: Abort loading ACR if no firmware was found
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
karolherbst committed Jul 12, 2023
1 parent c177872 commit 938a06c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/acr/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ nvkm_acr_oneinit(struct nvkm_subdev *subdev)
u64 falcons;
int ret, i;

if (list_empty(&acr->hsfw)) {
if (list_empty(&acr->hsfw) || !acr->func || !acr->func->wpr_layout) {
nvkm_debug(subdev, "No HSFW(s)\n");
nvkm_acr_cleanup(acr);
return 0;
Expand Down

0 comments on commit 938a06c

Please sign in to comment.