drm/amdgpu: remove an unnecessary condition
Subsystems (3)
PATCH 1/1 drm/amdgpu: remove an unnecessary condition
We already checked "if (r)" so there is no need to check again.
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +3 -6
@@ -111,12 +111,9 @@ 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 (amdgpu_device_is_px (dev)) {pm_runtime_use_autosuspend (dev->dev);
Christian König
maintainerQuoted 3 lines · Dan Carpenter
We already checked "if (r)" so there is no need to check again.
Signed-off-by Dan Carpenter <[email protected]>
Hi Dan,
thanks for taking a look into this. This patch and the other two you send today are Reviewed-by: Christian König <[email protected]>
That code was branched of from Radeon it is possible that the same changes apply there as well. Since it looks like you created those patches at least partially automatically could you run your tool on the Radeon code once more as well?
Thanks in advance,
Christian.
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-2@@ -111,12 +111,9 @@ 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);
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags) · line 119
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +3
-4-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 (amdgpu_device_is_px (dev)) {pm_runtime_use_autosuspend (dev->dev);
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html