]> git.baikalelectronics.ru Git - uboot.git/commit
gpio: Verify validity of pin offsets when looking up names
authorSamuel Holland <samuel@sholland.org>
Sat, 11 Sep 2021 22:05:51 +0000 (17:05 -0500)
committerTom Rini <trini@konsulko.com>
Tue, 5 Oct 2021 12:50:15 +0000 (08:50 -0400)
commit5f22adfaa0ce0430f91a8a6be5891b9d9a988302
tree9d9e5ffbda7d377e6ee1d9a8d3a5c75fe2490b78
parentb93e1777418ef6eb8a4b1e22acf4a90e6d7df010
gpio: Verify validity of pin offsets when looking up names

Translation of a pin name to a device+offset should fail if the 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