drm/nouveau/pm: fix oops if chipset has no pm support at all
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
4489b9835a
commit
c11dd0da52
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue