diff options
author | Wan Jiabing <wanjiabing@vivo.com> | 2022-05-13 09:55:54 +0200 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-05-16 13:22:37 +0200 |
commit | 71abb4df29815d17f3dff98dce553fc1732d9738 (patch) | |
tree | 591ae416fd04292b4c379558d31729b429ffb1bd /drivers/ata | |
parent | doc: admin-guide: Update libata kernel parameters (diff) | |
download | linux-71abb4df29815d17f3dff98dce553fc1732d9738.tar.xz linux-71abb4df29815d17f3dff98dce553fc1732d9738.zip |
ata: pata_ftide010: Remove unneeded ERROR check before clk_disable_unprepare
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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_ftide010.c | 7 |
1 files 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; } |