[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210916073722.9110-1-caihuoqing@baidu.com>
Date: Thu, 16 Sep 2021 15:37:21 +0800
From: Cai Huoqing <caihuoqing@...du.com>
To: <caihuoqing@...du.com>
CC: Thierry Reding <thierry.reding@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Jonathan Hunter <jonathanh@...dia.com>,
<dri-devel@...ts.freedesktop.org>, <linux-tegra@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] drm/tegra: plane: Improve use of dev_err_probe()
Return dev_err_probe() directly, because the return value of
dev_err_probe() is the appropriate error code, and it can
reduce code size, simplify the code.
Signed-off-by: Cai Huoqing <caihuoqing@...du.com>
---
drivers/gpu/drm/tegra/plane.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c
index e00ec3f40ec8..e373411b1f0b 100644
--- a/drivers/gpu/drm/tegra/plane.c
+++ b/drivers/gpu/drm/tegra/plane.c
@@ -744,21 +744,17 @@ int tegra_plane_interconnect_init(struct tegra_plane *plane)
plane->icc_mem = devm_of_icc_get(dev, icc_name);
err = PTR_ERR_OR_ZERO(plane->icc_mem);
- if (err) {
- dev_err_probe(dev, err, "failed to get %s interconnect\n",
- icc_name);
- return err;
- }
+ if (err)
+ return dev_err_probe(dev, err, "failed to get %s interconnect\n",
+ icc_name);
/* plane B on T20/30 has a dedicated memory client for a 6-tap vertical filter */
if (plane->index == 1 && dc->soc->has_win_b_vfilter_mem_client) {
plane->icc_mem_vfilter = devm_of_icc_get(dev, "winb-vfilter");
err = PTR_ERR_OR_ZERO(plane->icc_mem_vfilter);
- if (err) {
- dev_err_probe(dev, err, "failed to get %s interconnect\n",
- "winb-vfilter");
- return err;
- }
+ if (err)
+ return dev_err_probe(dev, err, "failed to get %s interconnect\n",
+ "winb-vfilter");
}
return 0;
--
2.25.1
Powered by blists - more mailing lists