diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-08-04 11:29:09 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-08-04 11:29:09 +0000 |
commit | 8010195fcffc1f167b74879e3a7c2ea6c034d86f (patch) | |
tree | da906006fa6c408a4f3761c903fb23c6455251ef | |
parent | eb634d4f7a158635c490a157ef357bb3ae84fc5c (diff) |
drm/amdgpu: Avoid printing of stack contents on firmware load error
From Jiri Kosina
ccc7a1bb322e4169b738aa3fc8b5dfcfefdacb37 in linux 5.10.y/5.10.56
6aade587d329ebe88319dfdb8e8c7b6aede80417 in mainline linux
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/psp_v12_0.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/psp_v12_0.c b/sys/dev/pci/drm/amd/amdgpu/psp_v12_0.c index cc9c2d145f3..877c96401d5 100644 --- a/sys/dev/pci/drm/amd/amdgpu/psp_v12_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/psp_v12_0.c @@ -67,7 +67,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp) err = psp_init_asd_microcode(psp, chip_name); if (err) - goto out; + return err; snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ta.bin", chip_name); err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev); @@ -80,7 +80,7 @@ static int psp_v12_0_init_microcode(struct psp_context *psp) } else { err = amdgpu_ucode_validate(adev->psp.ta_fw); if (err) - goto out2; + goto out; ta_hdr = (const struct ta_firmware_header_v1_0 *) adev->psp.ta_fw->data; @@ -105,10 +105,9 @@ static int psp_v12_0_init_microcode(struct psp_context *psp) return 0; -out2: +out: release_firmware(adev->psp.ta_fw); adev->psp.ta_fw = NULL; -out: if (err) { dev_err(adev->dev, "psp v12.0: Failed to load firmware \"%s\"\n", |