diff options
author | Geert Uytterhoeven <[email protected]> | 2019-03-28 14:13:47 +0100 |
---|---|---|
committer | Linus Walleij <[email protected]> | 2019-03-28 17:58:34 +0100 |
commit | f7299d441a4da8a5088e651ea55023525a793a13 (patch) | |
tree | 707a89a002434ede152561da9bb2a3344afce331 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 7ce40277bf848391705011ba37eac2e377cbd9e6 (diff) |
gpio: of: Fix of_gpiochip_add() error path
If the call to of_gpiochip_scan_gpios() in of_gpiochip_add() fails, no
error handling is performed. This lead to the need of callers to call
of_gpiochip_remove() on failure, which causes "BAD of_node_put() on ..."
if the failure happened before the call to of_node_get().
Fix this by adding proper error handling.
Note that calling gpiochip_remove_pin_ranges() multiple times causes no
harm: subsequent calls are a no-op.
Fixes: dfbd379ba9b7431e ("gpio: of: Return error if gpio hog configuration failed")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Mukesh Ojha <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions