diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-07-16 15:05:45 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-29 20:36:54 +0200 |
commit | b4fc5972c18d59b42d503d96147549a97784f912 (patch) | |
tree | c363477a64f5b655aa6c8a7bc3741d9512c95537 /drivers/gpu | |
parent | drm/amdgpu: Delete an unnecessary variable initialisation in amdgpu_cgs_acpi_... (diff) | |
download | linux-b4fc5972c18d59b42d503d96147549a97784f912.tar.xz linux-b4fc5972c18d59b42d503d96147549a97784f912.zip |
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: Christian König <christian.koenig@amd.com>
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c index f88e82a989d9..d637b8fc7dce 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c @@ -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: |