pinctrl: k210: Fix k210_fpioa_probe()
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 6 Aug 2021 00:43:11 +0000 (09:43 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Aug 2021 13:03:53 +0000 (15:03 +0200)
commit31697ef7f3f45293bba3da87bcc710953e97fc3e
treefb2ebf1415be9b3fb82c12c131cd63522f2a9917
parentd1dee814168538eba166ae4150b37f0d88257884
pinctrl: k210: Fix k210_fpioa_probe()

In k210_fpioa_probe(), add missing calls to clk_disable_unprepare() in
case of error after cenabling the clk and pclk clocks. Also add missing
error handling when enabling pclk.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: d4c34d09ab03 ("pinctrl: Add RISC-V Canaan Kendryte K210 FPIOA driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Link: https://lore.kernel.org/r/20210806004311.52859-1-damien.lemoal@wdc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-k210.c