linux/drivers/pinctrl/realtek
Dan Carpenter 8c58f51ff3 pinctrl: realtek: Fix error handling in probe()
There are several issues in the probe function:
1) of_iomap() return NULL on error but the code checks for error
   pointers.
2) pinctrl_register() is the reverse.  It returns error pointers
   but the code checks for NULL.
3) The error paths need to call iounmap(data->base) before returning
   to avoid a resource leak.

Fixes: e99ce78030 ("pinctrl: realtek: Add common pinctrl driver for Realtek DHC RTD SoCs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/590b337a-13ce-4391-a09d-d2b06fbc912d@moroto.mountain
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-10-06 23:05:28 +02:00
..
Kconfig pinctrl: realtek: Add pinctrl driver for RTD1619B 2023-09-20 13:07:19 +02:00
Makefile pinctrl: realtek: Add pinctrl driver for RTD1619B 2023-09-20 13:07:19 +02:00
pinctrl-rtd1315e.c
pinctrl-rtd1319d.c pinctrl: realtek: Add pinctrl driver for RTD1319D 2023-09-20 13:07:19 +02:00
pinctrl-rtd1619b.c pinctrl: realtek: Add pinctrl driver for RTD1619B 2023-09-20 13:07:19 +02:00
pinctrl-rtd.c pinctrl: realtek: Fix error handling in probe() 2023-10-06 23:05:28 +02:00
pinctrl-rtd.h