]> git.karo-electronics.de Git - karo-tx-uboot.git/commit
dm: gpio: Check a GPIO is valid before using it
authorSimon Glass <sjg@chromium.org>
Fri, 3 Jul 2015 00:16:16 +0000 (18:16 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:17:16 +0000 (08:17 +0200)
commita82dd9532597df20f56f46ca30c634a85cf7a51c
treeb31b3016d9d24ba4f849397ff51179a5804d6151
parentf35bff0ca37ecf22cae28a990e778533155731ab
dm: gpio: Check a GPIO is valid before using it

Since a gpio_desc is allowed to be invalid we should return an error
indicating that the operation cannot be completed. This can happen if the
GPIO is optional - e.g. some devices may have a reset line and some may
not.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/gpio/gpio-uclass.c