From: Dan Carpenter <dan.carpenter@oracle.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
dri-devel@lists.freedesktop.org, linux-sunxi@lists.linux.dev,
kernel-janitors@vger.kernel.org
Subject: [PATCH] drm/sun4i: dsi: delete unnecessary IS_ERR() checks
Date: Thu, 28 Apr 2022 15:26:23 +0300 [thread overview]
Message-ID: <YmqH71MtoGn2AXUg@kili> (raw)
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
next reply other threads:[~2022-04-28 12:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 12:26 Dan Carpenter [this message]
2022-04-29 14:45 ` (subset) [PATCH] drm/sun4i: dsi: delete unnecessary IS_ERR() checks Maxime Ripard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YmqH71MtoGn2AXUg@kili \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mripard@kernel.org \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox