diff options
| author | Francois Berder <[email protected]> | 2026-05-21 19:50:48 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-06-11 11:59:05 -0600 |
| commit | 9d551d78f74846fc4c4f2b369ca7da420e5e1fd6 (patch) | |
| tree | 8ea8941107d0be36b2a56765d981649003d43d47 /drivers | |
| parent | 379e74323d328dc7df16cf406e237d6187b1a307 (diff) | |
drivers: gpio: Fix dev_read_addr error check
dev_read_addr returns FDT_ADDR_T_NONE (-1) in case of error
and not 0.
Signed-off-by: Francois Berder <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpio/gpio-fxl6408.c | 2 | ||||
| -rw-r--r-- | drivers/gpio/pca953x_gpio.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-fxl6408.c b/drivers/gpio/gpio-fxl6408.c index c8d2dff5f7b..180799139b3 100644 --- a/drivers/gpio/gpio-fxl6408.c +++ b/drivers/gpio/gpio-fxl6408.c @@ -273,7 +273,7 @@ static int fxl6408_probe(struct udevice *dev) u32 val32; addr = dev_read_addr(dev); - if (addr == 0) + if (addr == FDT_ADDR_T_NONE) return -EINVAL; info->addr = addr; diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c index 523ca8473a8..965a5fcf30b 100644 --- a/drivers/gpio/pca953x_gpio.c +++ b/drivers/gpio/pca953x_gpio.c @@ -312,7 +312,7 @@ static int pca953x_probe(struct udevice *dev) u8 val[MAX_BANK]; addr = dev_read_addr(dev); - if (addr == 0) + if (addr == FDT_ADDR_T_NONE) return -ENODEV; info->addr = addr; |
