提交 2500a3c9 编写于 作者: D Dan Carpenter 提交者: Alex Deucher

drm/amd/powerplay: fix a reversed condition

This test was reversed so it would end up leading to a NULL dereference.

Fixes: 4630f0fa ('drm/amd/powerplay: add Carrizo smu support')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 85a21eaf
...@@ -818,7 +818,7 @@ static int cz_smu_fini(struct pp_smumgr *smumgr) ...@@ -818,7 +818,7 @@ static int cz_smu_fini(struct pp_smumgr *smumgr)
return -EINVAL; return -EINVAL;
cz_smu = (struct cz_smumgr *)smumgr->backend; cz_smu = (struct cz_smumgr *)smumgr->backend;
if (!cz_smu) { if (cz_smu) {
cgs_free_gpu_mem(smumgr->device, cgs_free_gpu_mem(smumgr->device,
cz_smu->toc_buffer.handle); cz_smu->toc_buffer.handle);
cgs_free_gpu_mem(smumgr->device, cgs_free_gpu_mem(smumgr->device,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册