* [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare
@ 2022-05-13 7:55 Wan Jiabing
2022-05-13 21:01 ` Sergey Shtylyov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Wan Jiabing @ 2022-05-13 7:55 UTC (permalink / raw)
To: Linus Walleij, Sergey Shtylyov, Damien Le Moal, linux-ide, linux-kernel
Cc: Wan Jiabing
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare
2022-05-13 7:55 [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare Wan Jiabing
@ 2022-05-13 21:01 ` Sergey Shtylyov
2022-05-13 21:27 ` Linus Walleij
2022-05-16 11:24 ` Damien Le Moal
2 siblings, 0 replies; 4+ messages in thread
From: Sergey Shtylyov @ 2022-05-13 21:01 UTC (permalink / raw)
To: Wan Jiabing, Linus Walleij, Damien Le Moal, linux-ide, linux-kernel
On 5/13/22 10:55 AM, Wan Jiabing wrote:
> 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>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]
MBR, Sergey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare
2022-05-13 7:55 [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare Wan Jiabing
2022-05-13 21:01 ` Sergey Shtylyov
@ 2022-05-13 21:27 ` Linus Walleij
2022-05-16 11:24 ` Damien Le Moal
2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2022-05-13 21:27 UTC (permalink / raw)
To: Wan Jiabing; +Cc: Sergey Shtylyov, Damien Le Moal, linux-ide, linux-kernel
On Fri, May 13, 2022 at 9:56 AM Wan Jiabing <wanjiabing@vivo.com> wrote:
> 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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare
2022-05-13 7:55 [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare Wan Jiabing
2022-05-13 21:01 ` Sergey Shtylyov
2022-05-13 21:27 ` Linus Walleij
@ 2022-05-16 11:24 ` Damien Le Moal
2 siblings, 0 replies; 4+ messages in thread
From: Damien Le Moal @ 2022-05-16 11:24 UTC (permalink / raw)
To: Wan Jiabing, Linus Walleij, Sergey Shtylyov, linux-ide, linux-kernel
On 2022/05/13 9:55, Wan Jiabing wrote:
> 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>
Applied to for-5.19. Thanks !
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-16 11:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 7:55 [PATCH] ata: Remove unneeded ERROR check before clk_disable_unprepare Wan Jiabing
2022-05-13 21:01 ` Sergey Shtylyov
2022-05-13 21:27 ` Linus Walleij
2022-05-16 11:24 ` Damien Le Moal
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).