Commit 8f9d7ef3 authored by Liu Shixin's avatar Liu Shixin Committed by Qiang Yu

drm/lima: simplify the return expression of lima_devfreq_target

Simplify the return expression.
Signed-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Signed-off-by: default avatarQiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200919100850.1639111-1-liushixin2@huawei.com
parent db4c02e4
...@@ -35,18 +35,13 @@ static int lima_devfreq_target(struct device *dev, unsigned long *freq, ...@@ -35,18 +35,13 @@ static int lima_devfreq_target(struct device *dev, unsigned long *freq,
u32 flags) u32 flags)
{ {
struct dev_pm_opp *opp; struct dev_pm_opp *opp;
int err;
opp = devfreq_recommended_opp(dev, freq, flags); opp = devfreq_recommended_opp(dev, freq, flags);
if (IS_ERR(opp)) if (IS_ERR(opp))
return PTR_ERR(opp); return PTR_ERR(opp);
dev_pm_opp_put(opp); dev_pm_opp_put(opp);
err = dev_pm_opp_set_rate(dev, *freq); return dev_pm_opp_set_rate(dev, *freq);
if (err)
return err;
return 0;
} }
static void lima_devfreq_reset(struct lima_devfreq *devfreq) static void lima_devfreq_reset(struct lima_devfreq *devfreq)
......
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