[PATCH] drm/exynos: fix err_cast.cocci warnings

From: kernel test robot
Date: Mon Jul 19 2021 - 18:03:58 EST


From: kernel test robot <lkp@xxxxxxxxx>

drivers/gpu/drm/bridge/samsung-dsim.c:1637:10-17: WARNING: ERR_CAST can be used with dsi -> clks [ i ]
drivers/gpu/drm/bridge/samsung-dsim.c:1651:9-16: WARNING: ERR_CAST can be used with dsi -> phy


Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

Generated by: scripts/coccinelle/api/err_cast.cocci

CC: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
---

tree: https://git.pengutronix.de/git/lst/linux imx8m-power-domains-testing
head: 743ce97bc237b4b97ffa933cd03f5a6c8b401384
commit: 0ce8e59076392e581e9b82892a973b17d55f136b [44/58] drm/exynos: move bridge driver to bridges
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago

samsung-dsim.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/bridge/samsung-dsim.c
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -1634,7 +1634,7 @@ static struct samsung_dsim *__samsung_ds

dev_info(dev, "failed to get the clock: %s\n",
clk_names[i]);
- return ERR_PTR(PTR_ERR(dsi->clks[i]));
+ return ERR_CAST(dsi->clks[i]);
}
}

@@ -1648,7 +1648,7 @@ static struct samsung_dsim *__samsung_ds
dsi->phy = devm_phy_get(dev, "dsim");
if (IS_ERR(dsi->phy)) {
dev_info(dev, "failed to get dsim phy\n");
- return ERR_PTR(PTR_ERR(dsi->phy));
+ return ERR_CAST(dsi->phy);
}

dsi->irq = platform_get_irq(pdev, 0);