diff options
author | Wan Jiabing <wanjiabing@vivo.com> | 2022-05-16 11:50:00 +0300 |
---|---|---|
committer | Bartosz Golaszewski <brgl@bgdev.pl> | 2022-05-16 23:16:13 +0300 |
commit | a998ec3d7bae4f996bb9dcf6d0c76b6c812f267b (patch) | |
tree | 8f49a969f3acaba48e93241ce0c0bb57f4a4d83c /drivers/gpio/gpio-ftgpio010.c | |
parent | 5561a2b086394f554c2ff031db4195f39db5213c (diff) | |
download | linux-a998ec3d7bae4f996bb9dcf6d0c76b6c812f267b.tar.xz |
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>
Diffstat (limited to 'drivers/gpio/gpio-ftgpio010.c')
-rw-r--r-- | drivers/gpio/gpio-ftgpio010.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-ftgpio010.c b/drivers/gpio/gpio-ftgpio010.c index b90a45c939a4..f422c3e129a0 100644 --- a/drivers/gpio/gpio-ftgpio010.c +++ b/drivers/gpio/gpio-ftgpio010.c @@ -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; } |