Commit c11dd0da authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/pm: fix oops if chipset has no pm support at all

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 4489b983
......@@ -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);
......
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