gpio: Verify validity of pin offsets from device trees
authorSamuel Holland <samuel@sholland.org>
Sat, 11 Sep 2021 22:05:52 +0000 (17:05 -0500)
committerTom Rini <trini@konsulko.com>
Tue, 5 Oct 2021 12:50:15 +0000 (08:50 -0400)
commit37c10bf7ef22ccaa349581984340a616fb1c6ffb
tree2448cfd8c333c96611d78c5952036dbc3c5d83bc
parent390ccffe07c45a3ad584ee6199cc1e63d07981ee
gpio: Verify validity of pin offsets from device trees

Translation of an OF GPIO specifier should fail if the pin offset is
larger than the number of pins in the GPIO bank.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/gpio/gpio-uclass.c