提交 a698e417 编写于 作者: E Edward O'Callaghan 提交者: Alex Deucher

drivers/amdgpu: Remove redundant NULL check before kfree()

Found-by: Coccinelle
Signed-off-by: NEdward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: NTom St Denis <tom.stdenis@amd.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 004e29cc
......@@ -1065,8 +1065,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
}
error:
if (obj != NULL)
kfree(obj);
kfree(obj);
kfree((void *)input.pointer);
return result;
}
......
......@@ -77,8 +77,7 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr,
result = phm_run_table(hwmgr, rt_table, input, output, temp_storage);
if (NULL != temp_storage)
kfree(temp_storage);
kfree(temp_storage);
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册