提交 b4fc5972 编写于 作者: M Markus Elfring 提交者: Alex Deucher

drm/amdgpu: Change assignment for a variable in amdgpu_cgs_acpi_eval_object()

Indicate successful function execution only at the end.
Thus omit initialisation for the variable "result" at the beginning.
Reviewed-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 eb09d7a7
......@@ -920,7 +920,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
struct cgs_acpi_method_argument *argument;
uint32_t i, count;
acpi_status status;
int result = 0;
int result;
handle = ACPI_HANDLE(&adev->pdev->dev);
if (!handle)
......@@ -1061,6 +1061,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
params++;
}
result = 0;
free_obj:
kfree(obj);
free_input:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册