dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/sun4i: dsi: delete unnecessary IS_ERR() checks
@ 2022-04-28 12:26 Dan Carpenter
  2022-04-29 14:45 ` (subset) " Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2022-04-28 12:26 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Samuel Holland, David Airlie, kernel-janitors, dri-devel,
	Chen-Yu Tsai, Jernej Skrabec, linux-sunxi

The "dsi->bus_clk" pointer cannot be an error pointer at this point.
The check is confusing and unnecessary.  Delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
index 527c7b2474da..b4dfa166eccd 100644
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
@@ -1193,8 +1193,8 @@ static int sun6i_dsi_probe(struct platform_device *pdev)
 err_unprotect_clk:
 	clk_rate_exclusive_put(dsi->mod_clk);
 err_attach_clk:
-	if (!IS_ERR(dsi->bus_clk))
-		regmap_mmio_detach_clk(dsi->regs);
+	regmap_mmio_detach_clk(dsi->regs);
+
 	return ret;
 }
 
@@ -1207,8 +1207,7 @@ static int sun6i_dsi_remove(struct platform_device *pdev)
 	mipi_dsi_host_unregister(&dsi->host);
 	clk_rate_exclusive_put(dsi->mod_clk);
 
-	if (!IS_ERR(dsi->bus_clk))
-		regmap_mmio_detach_clk(dsi->regs);
+	regmap_mmio_detach_clk(dsi->regs);
 
 	return 0;
 }
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: (subset) [PATCH] drm/sun4i: dsi: delete unnecessary IS_ERR() checks
  2022-04-28 12:26 [PATCH] drm/sun4i: dsi: delete unnecessary IS_ERR() checks Dan Carpenter
@ 2022-04-29 14:45 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2022-04-29 14:45 UTC (permalink / raw)
  To: Maxime Ripard, Dan Carpenter
  Cc: Samuel Holland, David Airlie, dri-devel, kernel-janitors,
	Jernej Skrabec, Chen-Yu Tsai, Maxime Ripard, linux-sunxi

On Thu, 28 Apr 2022 15:26:23 +0300, Dan Carpenter wrote:
> The "dsi->bus_clk" pointer cannot be an error pointer at this point.
> The check is confusing and unnecessary.  Delete it.
> 
> 

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-29 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 12:26 [PATCH] drm/sun4i: dsi: delete unnecessary IS_ERR() checks Dan Carpenter
2022-04-29 14:45 ` (subset) " Maxime Ripard

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).