提交 c11dd0da 编写于 作者: B Ben Skeggs

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

Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册