From: jsg Date: Wed, 4 Aug 2021 11:29:08 +0000 (+0000) Subject: drm/amdgpu: Avoid printing of stack contents on firmware load error X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e2c681d70f065798d7a581fd1ac2881ba97517d5;p=openbsd 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 --- 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",