From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: dri-devel@lists.freedesktop.org, alyssa@rosenzweig.io,
steven.price@arm.com, tomeu.vizoso@collabora.com,
robh@kernel.org
Cc: linux-kernel@vger.kernel.org, daniel@ffwll.ch, airlied@linux.ie,
robin.murphy@arm.com, linux-amlogic@lists.infradead.org,
linux-rockchip@lists.infradead.org,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Subject: [PATCH RFT v1 2/3] drm/panfrost: call dev_pm_opp_of_remove_table() in all error-paths
Date: Wed, 8 Jan 2020 00:06:25 +0100 [thread overview]
Message-ID: <20200107230626.885451-3-martin.blumenstingl@googlemail.com> (raw)
In-Reply-To: <20200107230626.885451-1-martin.blumenstingl@googlemail.com>
If devfreq_recommended_opp() fails we need to undo
dev_pm_opp_of_add_table() by calling dev_pm_opp_of_remove_table() (just
like we do it in the other error-path below).
Fixes: f3ba91228e8e91 ("drm/panfrost: Add initial panfrost driver")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
index 1471588763ce..170f6c8c9651 100644
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
@@ -93,8 +93,10 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
cur_freq = clk_get_rate(pfdev->clock);
opp = devfreq_recommended_opp(dev, &cur_freq, 0);
- if (IS_ERR(opp))
+ if (IS_ERR(opp)) {
+ dev_pm_opp_of_remove_table(dev);
return PTR_ERR(opp);
+ }
panfrost_devfreq_profile.initial_freq = cur_freq;
dev_pm_opp_put(opp);
--
2.24.1
next prev parent reply other threads:[~2020-01-07 23:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 23:06 [PATCH RFT v1 0/3] devfreq fixes for panfrost Martin Blumenstingl
2020-01-07 23:06 ` [PATCH RFT v1 1/3] drm/panfrost: enable devfreq based the "operating-points-v2" property Martin Blumenstingl
2020-01-08 11:18 ` Robin Murphy
2020-01-08 12:38 ` Martin Blumenstingl
2020-01-08 14:20 ` Robin Murphy
2020-01-07 23:06 ` Martin Blumenstingl [this message]
2020-01-09 11:31 ` [PATCH RFT v1 2/3] drm/panfrost: call dev_pm_opp_of_remove_table() in all error-paths Steven Price
2020-01-07 23:06 ` [PATCH RFT v1 3/3] drm/panfrost: Use the mali-supply regulator for control again Martin Blumenstingl
2020-01-09 11:31 ` Steven Price
2020-01-09 17:27 ` Martin Blumenstingl
2020-01-13 17:10 ` Steven Price
2020-01-14 20:21 ` Martin Blumenstingl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200107230626.885451-3-martin.blumenstingl@googlemail.com \
--to=martin.blumenstingl@googlemail.com \
--cc=airlied@linux.ie \
--cc=alyssa@rosenzweig.io \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=steven.price@arm.com \
--cc=tomeu.vizoso@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).