Skip to content

Commit

Permalink
drm/panfrost: Fix missing clk_disable_unprepare() on error in panfros…
Browse files Browse the repository at this point in the history
…t_clk_init()

[ Upstream commit f424987 ]

Fix the missing clk_disable_unprepare() before return
from panfrost_clk_init() in the error handling case.

Fixes: b681af0 ("drm: panfrost: add optional bus_clock")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@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/20210608143856.4154766-1-weiyongjun1@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Wei Yongjun authored and gregkh committed Sep 15, 2021
1 parent 1e14234 commit 5491272
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/panfrost/panfrost_device.c
Expand Up @@ -60,7 +60,8 @@ static int panfrost_clk_init(struct panfrost_device *pfdev)
if (IS_ERR(pfdev->bus_clock)) {
dev_err(pfdev->dev, "get bus_clock failed %ld\n",
PTR_ERR(pfdev->bus_clock));
return PTR_ERR(pfdev->bus_clock);
err = PTR_ERR(pfdev->bus_clock);
goto disable_clock;
}

if (pfdev->bus_clock) {
Expand Down

0 comments on commit 5491272

Please sign in to comment.