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:
Родитель
5561a2b086
Коммит
a998ec3d7b
|
@ -315,8 +315,8 @@ static int ftgpio_gpio_probe(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
dis_clk:
|
dis_clk:
|
||||||
if (!IS_ERR(g->clk))
|
clk_disable_unprepare(g->clk);
|
||||||
clk_disable_unprepare(g->clk);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,8 +324,8 @@ static int ftgpio_gpio_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct ftgpio_gpio *g = platform_get_drvdata(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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче