summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/lima
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2019-06-21 19:21:16 +0300
committerQiang Yu <yuq825@gmail.com>2019-06-23 06:23:18 +0300
commit7b4e467d2f995702ad473cacd05a00a744a43cc5 (patch)
treee69486e743d04dfd01a48ccbbb035f3f389154b6 /drivers/gpu/drm/lima
parent34e88f9e2fff2d46a206e4d94c9e8fdf45b85d9a (diff)
downloadlinux-7b4e467d2f995702ad473cacd05a00a744a43cc5.tar.xz
drm/lima: Reduce number of PTR_ERR() calls
Store the PTR_ERR() result in local variable in clock init error path. This makes the code consistent with similar section in regulator init code. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Qiang Yu <yuq825@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190621162117.22533-3-krzk@kernel.org
Diffstat (limited to 'drivers/gpu/drm/lima')
-rw-r--r--drivers/gpu/drm/lima/lima_device.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/lima/lima_device.c b/drivers/gpu/drm/lima/lima_device.c
index bb2eaa4f370e..9a6cd879bcb1 100644
--- a/drivers/gpu/drm/lima/lima_device.c
+++ b/drivers/gpu/drm/lima/lima_device.c
@@ -83,14 +83,16 @@ static int lima_clk_init(struct lima_device *dev)
dev->clk_bus = devm_clk_get(dev->dev, "bus");
if (IS_ERR(dev->clk_bus)) {
- dev_err(dev->dev, "get bus clk failed %ld\n", PTR_ERR(dev->clk_bus));
- return PTR_ERR(dev->clk_bus);
+ err = PTR_ERR(dev->clk_bus);
+ dev_err(dev->dev, "get bus clk failed %d\n", err);
+ return err;
}
dev->clk_gpu = devm_clk_get(dev->dev, "core");
if (IS_ERR(dev->clk_gpu)) {
- dev_err(dev->dev, "get core clk failed %ld\n", PTR_ERR(dev->clk_gpu));
- return PTR_ERR(dev->clk_gpu);
+ err = PTR_ERR(dev->clk_gpu);
+ dev_err(dev->dev, "get core clk failed %d\n", err);
+ return err;
}
err = clk_prepare_enable(dev->clk_bus);