diff options
| author | Geert Uytterhoeven <[email protected]> | 2016-02-19 11:00:50 +0100 |
|---|---|---|
| committer | Linus Walleij <[email protected]> | 2016-02-25 10:04:25 +0100 |
| commit | 40c8eabac43db862810367edb2fe9ec7f69e814e (patch) | |
| tree | 60c535a4724dd17d41aea2d330dc26d6e79715c2 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
| parent | bb91d345b49f9ca8ccf3ed9cc3346decdd9c4c3f (diff) | |
gpio: Propagate all errors in devm_get_gpiod_from_child()
devm_get_gpiod_from_child() tries several property suffixes to find a
GPIO descriptor. If all suffixes fail and no probe deferral has been
detected, it returns the error of the last try.
However, if any but the last try fails with a real error (e.g. -EBUSY),
this error is not propagated, and -ENOENT will be returned.
This confuses drivers that e.g. want to detect if a GPIO is already in
use.
To fix this, change the loop logic to continue on -ENOENT, which
indicates the property was not found and the next suffix should be
tried, and propagate all other detected errors.
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions