Skip to content

Commit a998ec3

Browse files
Wan Jiabingbrgl
authored andcommitted
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]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 5561a2b commit a998ec3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpio/gpio-ftgpio010.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,17 +315,17 @@ static int ftgpio_gpio_probe(struct platform_device *pdev)
315315
return 0;
316316

317317
dis_clk:
318-
if (!IS_ERR(g->clk))
319-
clk_disable_unprepare(g->clk);
318+
clk_disable_unprepare(g->clk);
319+
320320
return ret;
321321
}
322322

323323
static int ftgpio_gpio_remove(struct platform_device *pdev)
324324
{
325325
struct ftgpio_gpio *g = platform_get_drvdata(pdev);
326326

327-
if (!IS_ERR(g->clk))
328-
clk_disable_unprepare(g->clk);
327+
clk_disable_unprepare(g->clk);
328+
329329
return 0;
330330
}
331331

0 commit comments

Comments
 (0)