diff options
author | Tom Rini <trini@ti.com> | 2014-05-30 11:34:39 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-05-30 11:34:39 -0400 |
commit | 90b51c33f362926e17d4c07dcef1ce822abaa89f (patch) | |
tree | 9eb339bb2b864bfac2434d0cd808301506e9bb82 /drivers/gpio | |
parent | 95856248ca93b9048d87264fbef67ca382975650 (diff) | |
parent | 9637a1bb896efe392a58dd2772e2c3fcb646409d (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/at91_gpio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 0b70071871..6517af1628 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -34,6 +34,7 @@ static struct at91_port *at91_pio_get_port(unsigned port) #endif #endif default: + printf("Error: at91_gpio: Fail to get PIO base!\n"); return NULL; } } @@ -200,7 +201,7 @@ int at91_set_pio_output(unsigned port, u32 pin, int value) struct at91_port *at91_port = at91_pio_get_port(port); u32 mask; - if ((port < ATMEL_PIO_PORTS) && (pin < 32)) { + if (at91_port && (port < ATMEL_PIO_PORTS) && (pin < 32)) { mask = 1 << pin; writel(mask, &at91_port->idr); writel(mask, &at91_port->pudr); |