diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-10-05 17:01:25 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-10-06 23:05:28 +0200 |
commit | 8c58f51ff3c9f2bba5d2d0d01f5561f579e4f485 (patch) | |
tree | 91c38a3653d7c4369c60632d46fbb6aa1ab51865 /tools/perf/scripts/python/check-perf-trace.py | |
parent | 1c0b3cbe7fd98f54fb447e74119216f550a045b9 (diff) |
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: e99ce78030db ("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>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions