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
1 changed files with 5 additions and 3 deletions
|
@ -284,9 +284,11 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
|
||||||
|
|
||||||
memset(perflvl, 0, sizeof(*perflvl));
|
memset(perflvl, 0, sizeof(*perflvl));
|
||||||
|
|
||||||
|
if (pm->clocks_get) {
|
||||||
ret = pm->clocks_get(dev, perflvl);
|
ret = pm->clocks_get(dev, perflvl);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
if (pm->voltage.supported && pm->voltage_get) {
|
if (pm->voltage.supported && pm->voltage_get) {
|
||||||
ret = pm->voltage_get(dev);
|
ret = pm->voltage_get(dev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue