summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/panfrost/panfrost_devfreq.c
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-21 21:10:21 +0800
committerSteven Price <steven.price@arm.com>2020-10-01 13:59:01 +0100
commit0c5036590bde1407a6250ea027e836815353820f (patch)
tree7c3bcc5f3f50764f1aee84f3460340121a5fcdcb /drivers/gpu/drm/panfrost/panfrost_devfreq.c
parent3c4641d4e75618fa1b5501b9ae9c19f765d75725 (diff)
drm/panfrost: simplify the return expression of panfrost_devfreq_target()
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Reviewed-by: Steven Price <steven.price@arm.com> Signed-off-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200921131021.91604-1-miaoqinglang@huawei.com
Diffstat (limited to 'drivers/gpu/drm/panfrost/panfrost_devfreq.c')
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_devfreq.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 8ab025d0035f..913eaa6d0bc6 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -29,18 +29,13 @@ static int panfrost_devfreq_target(struct device *dev, unsigned long *freq,
u32 flags)
{
struct dev_pm_opp *opp;
- int err;
opp = devfreq_recommended_opp(dev, freq, flags);
if (IS_ERR(opp))
return PTR_ERR(opp);
dev_pm_opp_put(opp);
- err = dev_pm_opp_set_rate(dev, *freq);
- if (err)
- return err;
-
- return 0;
+ return dev_pm_opp_set_rate(dev, *freq);
}
static void panfrost_devfreq_reset(struct panfrost_devfreq *pfdevfreq)