Commit 5a2a19b7 authored by Yushan Zhou's avatar Yushan Zhou Committed by Alex Deucher

drm/amdgpu: remove redundant NULL check

release_firmware() checks whether firmware pointer is NULL.
Remove the redundant NULL check in psp_sw_fini().
Signed-off-by: default avatarYushan Zhou <katrinzhou@tencent.com>
Reviewed-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 65009bf2
...@@ -513,26 +513,22 @@ static int psp_sw_fini(void *handle) ...@@ -513,26 +513,22 @@ static int psp_sw_fini(void *handle)
struct psp_gfx_cmd_resp *cmd = psp->cmd; struct psp_gfx_cmd_resp *cmd = psp->cmd;
psp_memory_training_fini(psp); psp_memory_training_fini(psp);
if (psp->sos_fw) {
release_firmware(psp->sos_fw); release_firmware(psp->sos_fw);
psp->sos_fw = NULL; psp->sos_fw = NULL;
}
if (psp->asd_fw) { release_firmware(psp->asd_fw);
release_firmware(psp->asd_fw); psp->asd_fw = NULL;
psp->asd_fw = NULL;
} release_firmware(psp->ta_fw);
if (psp->ta_fw) { psp->ta_fw = NULL;
release_firmware(psp->ta_fw);
psp->ta_fw = NULL; release_firmware(psp->cap_fw);
} psp->cap_fw = NULL;
if (psp->cap_fw) {
release_firmware(psp->cap_fw); release_firmware(psp->toc_fw);
psp->cap_fw = NULL; psp->toc_fw = NULL;
}
if (psp->toc_fw) {
release_firmware(psp->toc_fw);
psp->toc_fw = NULL;
}
if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(11, 0, 0) || if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(11, 0, 0) ||
adev->ip_versions[MP0_HWIP][0] == IP_VERSION(11, 0, 7)) adev->ip_versions[MP0_HWIP][0] == IP_VERSION(11, 0, 7))
psp_sysfs_fini(adev); psp_sysfs_fini(adev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment