amdgpu_kms: Remove unnecessary condition check
authorAurabindo Pillai <mail@aurabindo.in>
Tue, 7 Apr 2020 18:26:18 +0000 (14:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Apr 2020 14:43:18 +0000 (10:43 -0400)
Execution will only reach here if the asserted condition is true.
Hence there is no need for the additional check.

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

index fd1dc3236ecae0a4c169677a39cc07fe43cb8d2a..ea7e72ecaefa2dee0ce6c24d1a27309bb5c0f358 100644 (file)
@@ -183,12 +183,10 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
        /* Call ACPI methods: require modeset init
         * but failure is not fatal
         */
-       if (!r) {
-               acpi_status = amdgpu_acpi_init(adev);
-               if (acpi_status)
-                       dev_dbg(&dev->pdev->dev,
-                               "Error during ACPI methods call\n");
-       }
+
+       acpi_status = amdgpu_acpi_init(adev);
+       if (acpi_status)
+               dev_dbg(&dev->pdev->dev, "Error during ACPI methods call\n");
 
        if (adev->runpm) {
                dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP);