aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index c88edae33deb..a8d162c6f829 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -398,6 +398,7 @@ void radeon_pm_resume(struct radeon_device *rdev)
398 398
399int radeon_pm_init(struct radeon_device *rdev) 399int radeon_pm_init(struct radeon_device *rdev)
400{ 400{
401 int ret;
401 /* default to profile method */ 402 /* default to profile method */
402 rdev->pm.pm_method = PM_METHOD_PROFILE; 403 rdev->pm.pm_method = PM_METHOD_PROFILE;
403 rdev->pm.dynpm_state = DYNPM_STATE_DISABLED; 404 rdev->pm.dynpm_state = DYNPM_STATE_DISABLED;
@@ -427,8 +428,12 @@ int radeon_pm_init(struct radeon_device *rdev)
427 } 428 }
428 429
429 /* where's the best place to put these? */ 430 /* where's the best place to put these? */
430 device_create_file(rdev->dev, &dev_attr_power_profile); 431 ret = device_create_file(rdev->dev, &dev_attr_power_profile);
431 device_create_file(rdev->dev, &dev_attr_power_method); 432 if (ret)
433 DRM_ERROR("failed to create device file for power profile\n");
434 ret = device_create_file(rdev->dev, &dev_attr_power_method);
435 if (ret)
436 DRM_ERROR("failed to create device file for power method\n");
432 437
433#ifdef CONFIG_ACPI 438#ifdef CONFIG_ACPI
434 rdev->acpi_nb.notifier_call = radeon_acpi_event; 439 rdev->acpi_nb.notifier_call = radeon_acpi_event;