gpio: ftgpio: Remove unneeded ERROR check before clk_disable_unprepare
clk_disable_unprepare() already checks ERROR by using IS_ERR_OR_NULL. Remove unneeded ERROR check for g->clk. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
This commit is contained in:
parent
5561a2b086
commit
a998ec3d7b
@ -315,8 +315,8 @@ static int ftgpio_gpio_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
dis_clk:
|
||||
if (!IS_ERR(g->clk))
|
||||
clk_disable_unprepare(g->clk);
|
||||
clk_disable_unprepare(g->clk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -324,8 +324,8 @@ static int ftgpio_gpio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ftgpio_gpio *g = platform_get_drvdata(pdev);
|
||||
|
||||
if (!IS_ERR(g->clk))
|
||||
clk_disable_unprepare(g->clk);
|
||||
clk_disable_unprepare(g->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user