From: Wan Jiabing <wanjiabing@vivo.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Sergey Shtylyov <s.shtylyov@omp.ru>,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Wan Jiabing <wanjiabing@vivo.com>
Subject: [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare
Date: Fri, 13 May 2022 15:55:54 +0800 [thread overview]
Message-ID: <20220513075554.127677-1-wanjiabing@vivo.com> (raw)
ERROR check is already in clk_disable() and clk_unprepare() by using
IS_ERR_OR_NULL. Remove unneeded ERROR check for ftide->pclk here.
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
drivers/ata/pata_ftide010.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/pata_ftide010.c b/drivers/ata/pata_ftide010.c
index 2e35505b683c..0117df0fe3c5 100644
--- a/drivers/ata/pata_ftide010.c
+++ b/drivers/ata/pata_ftide010.c
@@ -536,8 +536,8 @@ static int pata_ftide010_probe(struct platform_device *pdev)
return 0;
err_dis_clk:
- if (!IS_ERR(ftide->pclk))
- clk_disable_unprepare(ftide->pclk);
+ clk_disable_unprepare(ftide->pclk);
+
return ret;
}
@@ -547,8 +547,7 @@ static int pata_ftide010_remove(struct platform_device *pdev)
struct ftide010 *ftide = host->private_data;
ata_host_detach(ftide->host);
- if (!IS_ERR(ftide->pclk))
- clk_disable_unprepare(ftide->pclk);
+ clk_disable_unprepare(ftide->pclk);
return 0;
}
--
2.35.1
next reply other threads:[~2022-05-13 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 7:55 Wan Jiabing [this message]
2022-05-13 21:01 ` [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare Sergey Shtylyov
2022-05-13 21:27 ` Linus Walleij
2022-05-16 11:24 ` Damien Le Moal
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=20220513075554.127677-1-wanjiabing@vivo.com \
--to=wanjiabing@vivo.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=linus.walleij@linaro.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s.shtylyov@omp.ru \
/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;
as well as URLs for NNTP newsgroup(s).