Skip to content

Commit

Permalink
drm/nouveau/pm: fix oops if chipset has no pm support at all
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Mar 13, 2012
1 parent 4489b98 commit c11dd0d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/gpu/drm/nouveau/nouveau_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,11 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)

memset(perflvl, 0, sizeof(*perflvl));

ret = pm->clocks_get(dev, perflvl);
if (ret)
return ret;
if (pm->clocks_get) {
ret = pm->clocks_get(dev, perflvl);
if (ret)
return ret;
}

if (pm->voltage.supported && pm->voltage_get) {
ret = pm->voltage_get(dev);
Expand Down

0 comments on commit c11dd0d

Please sign in to comment.