diff options
author | Dave Airlie <airlied@redhat.com> | 2010-05-18 19:00:14 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-18 18:58:56 +1000 |
commit | 26481fb15644b5fd85d4cea020f74a234cdf6803 (patch) | |
tree | ae5e3f8b4959824c835ee8787f0ef960f69ca45d /drivers/gpu | |
parent | 4bff51711ca8709c5f18640ad6e8ae6b9e8f8047 (diff) |
drm/radeon/pm: fix device_create_file return value checks.
print an error if these fail.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_pm.c | 9 |
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 c88edae33de..a8d162c6f82 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) int radeon_pm_init(struct radeon_device *rdev) { + int ret; /* default to profile method */ rdev->pm.pm_method = PM_METHOD_PROFILE; rdev->pm.dynpm_state = DYNPM_STATE_DISABLED; @@ -427,8 +428,12 @@ int radeon_pm_init(struct radeon_device *rdev) } /* where's the best place to put these? */ - device_create_file(rdev->dev, &dev_attr_power_profile); - device_create_file(rdev->dev, &dev_attr_power_method); + ret = device_create_file(rdev->dev, &dev_attr_power_profile); + 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 rdev->acpi_nb.notifier_call = radeon_acpi_event; |