Commit 26481fb1 authored by Dave Airlie's avatar Dave Airlie

drm/radeon/pm: fix device_create_file return value checks.

print an error if these fail.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 4bff5171
...@@ -398,6 +398,7 @@ void radeon_pm_resume(struct radeon_device *rdev) ...@@ -398,6 +398,7 @@ void radeon_pm_resume(struct radeon_device *rdev)
int radeon_pm_init(struct radeon_device *rdev) int radeon_pm_init(struct radeon_device *rdev)
{ {
int ret;
/* default to profile method */ /* default to profile method */
rdev->pm.pm_method = PM_METHOD_PROFILE; rdev->pm.pm_method = PM_METHOD_PROFILE;
rdev->pm.dynpm_state = DYNPM_STATE_DISABLED; rdev->pm.dynpm_state = DYNPM_STATE_DISABLED;
...@@ -427,8 +428,12 @@ int radeon_pm_init(struct radeon_device *rdev) ...@@ -427,8 +428,12 @@ int radeon_pm_init(struct radeon_device *rdev)
} }
/* where's the best place to put these? */ /* where's the best place to put these? */
device_create_file(rdev->dev, &dev_attr_power_profile); ret = device_create_file(rdev->dev, &dev_attr_power_profile);
device_create_file(rdev->dev, &dev_attr_power_method); if (ret)
DRM_ERROR("failed to create device file for power profile\n");
ret = device_create_file(rdev->dev, &dev_attr_power_method);
if (ret)
DRM_ERROR("failed to create device file for power method\n");
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
rdev->acpi_nb.notifier_call = radeon_acpi_event; rdev->acpi_nb.notifier_call = radeon_acpi_event;
......
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