summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-10-23 14:05:34 -0400
committerTom Rini <trini@ti.com>2014-10-23 14:05:34 -0400
commit03a3536c7b7f2902932606da9248c6f08318174a (patch)
tree414815bd812360c88c338416f5bb6c67ed7ba75d /drivers/gpio
parent7bfd5ee1170eca10d26858b6b2ed36317cc686fd (diff)
parent9aafef4f360616a507578b8868092f096b093aa9 (diff)
downloadu-boot-imx-03a3536c7b7f2902932606da9248c6f08318174a.zip
u-boot-imx-03a3536c7b7f2902932606da9248c6f08318174a.tar.gz
u-boot-imx-03a3536c7b7f2902932606da9248c6f08318174a.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-tegra
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/tegra_gpio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c
index 1cc4abb..70663fc 100644
--- a/drivers/gpio/tegra_gpio.c
+++ b/drivers/gpio/tegra_gpio.c
@@ -171,6 +171,9 @@ static int tegra_gpio_request(struct udevice *dev, unsigned offset,
{
struct tegra_port_info *state = dev_get_priv(dev);
+ if (!label)
+ return -EINVAL;
+
if (*state->label[offset])
return -EBUSY;