Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wan Jiabing and committed by
Bartosz Golaszewski
a998ec3d 5561a2b0

+4 -4
+4 -4
drivers/gpio/gpio-ftgpio010.c
··· 315 315 return 0; 316 316 317 317 dis_clk: 318 - if (!IS_ERR(g->clk)) 319 - clk_disable_unprepare(g->clk); 318 + clk_disable_unprepare(g->clk); 319 + 320 320 return ret; 321 321 } 322 322 ··· 324 324 { 325 325 struct ftgpio_gpio *g = platform_get_drvdata(pdev); 326 326 327 - if (!IS_ERR(g->clk)) 328 - clk_disable_unprepare(g->clk); 327 + clk_disable_unprepare(g->clk); 328 + 329 329 return 0; 330 330 } 331 331