Commit b4fc5972 authored by Markus Elfring's avatar Markus Elfring Committed by 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: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent eb09d7a7
...@@ -920,7 +920,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device, ...@@ -920,7 +920,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
struct cgs_acpi_method_argument *argument; struct cgs_acpi_method_argument *argument;
uint32_t i, count; uint32_t i, count;
acpi_status status; acpi_status status;
int result = 0; int result;
handle = ACPI_HANDLE(&adev->pdev->dev); handle = ACPI_HANDLE(&adev->pdev->dev);
if (!handle) if (!handle)
...@@ -1061,6 +1061,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device, ...@@ -1061,6 +1061,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
params++; params++;
} }
result = 0;
free_obj: free_obj:
kfree(obj); kfree(obj);
free_input: free_input:
......
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