gpio: ftgpio: Remove unneeded ERROR check before clk_disable_unprepare
PATCH 1/1 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 <[email protected]>
--- drivers/gpio/gpio-ftgpio010.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpio/gpio-ftgpio010.c +4 -4
@@ -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 ; }
Signature · 1 line
2.36.1
Bartosz Golaszewski
AppliedQuoted 36 lines · Wan Jiabing
clk_disable_unprepare()already checks ERROR by usingIS_ERR_OR_NULL. Remove unneeded ERROR check forg->clk.Signed-off-by Wan Jiabing <[email protected]>--- drivers/gpio/gpio-ftgpio010.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/gpio/gpio-ftgpio010.c +4
-5@@ -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 ; } --
Quoted 2 lines
2.36.1
Applied, thanks!
Bart