Skip to content

Commit

Permalink
ata: pata_ftide010: Remove unneeded ERROR check before clk_disable_un…
Browse files Browse the repository at this point in the history
…prepare

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>
  • Loading branch information
Wan Jiabing authored and Damien Le Moal committed May 16, 2022
1 parent fa82cab commit 71abb4d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/ata/pata_ftide010.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 71abb4d

Please sign in to comment.