[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200921131021.91604-1-miaoqinglang@huawei.com>
Date: Mon, 21 Sep 2020 21:10:21 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Rob Herring <robh@...nel.org>,
Tomeu Vizoso <tomeu.vizoso@...labora.com>,
Steven Price <steven.price@....com>,
Alyssa Rosenzweig <alyssa.rosenzweig@...labora.com>,
David Airlie <airlied@...ux.ie>,
"Daniel Vetter" <daniel@...ll.ch>
CC: <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
Qinglang Miao <miaoqinglang@...wei.com>
Subject: [PATCH -next] drm/panfrost: simplify the return expression of panfrost_devfreq_target()
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
---
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 8ab025d00..913eaa6d0 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)
--
2.23.0
Powered by blists - more mailing lists