diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-03-06 23:18:49 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-03-13 03:15:02 -0400 |
commit | c11dd0da5277596d0ccdccb745b273d69a94f2d7 (patch) | |
tree | 6d70b7ca4c4d0f896cc7a1c4c3271f8594b33175 /drivers/gpu | |
parent | 4489b9835a0867617a9ec29cc978a9c2c9eca363 (diff) |
drm/nouveau/pm: fix oops if chipset has no pm support at all
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_pm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index dcc16927716f..34d591b7d4ef 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c | |||
@@ -284,9 +284,11 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl) | |||
284 | 284 | ||
285 | memset(perflvl, 0, sizeof(*perflvl)); | 285 | memset(perflvl, 0, sizeof(*perflvl)); |
286 | 286 | ||
287 | ret = pm->clocks_get(dev, perflvl); | 287 | if (pm->clocks_get) { |
288 | if (ret) | 288 | ret = pm->clocks_get(dev, perflvl); |
289 | return ret; | 289 | if (ret) |
290 | return ret; | ||
291 | } | ||
290 | 292 | ||
291 | if (pm->voltage.supported && pm->voltage_get) { | 293 | if (pm->voltage.supported && pm->voltage_get) { |
292 | ret = pm->voltage_get(dev); | 294 | ret = pm->voltage_get(dev); |