diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-11 13:23:26 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-03-14 15:34:50 -0600 |
commit | 3f603cbbb8e175e545d6037a783e1ef82bab30f9 (patch) | |
tree | c3122b2be426be9bcfd3285bda86cb175fb9aaeb /drivers/gpio | |
parent | b06750501f5c0eef7fef094f13d2f2e313c60b79 (diff) | |
download | u-boot-imx-3f603cbbb8e175e545d6037a783e1ef82bab30f9.zip u-boot-imx-3f603cbbb8e175e545d6037a783e1ef82bab30f9.tar.gz u-boot-imx-3f603cbbb8e175e545d6037a783e1ef82bab30f9.tar.bz2 |
dm: Use uclass_first_device_err() where it is useful
Use this new function in places where it simplifies the code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/rk_gpio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/rk_gpio.c b/drivers/gpio/rk_gpio.c index c62f025..40e87bd 100644 --- a/drivers/gpio/rk_gpio.c +++ b/drivers/gpio/rk_gpio.c @@ -116,11 +116,9 @@ static int rockchip_gpio_probe(struct udevice *dev) /* This only supports RK3288 at present */ priv->regs = (struct rockchip_gpio_regs *)dev_get_addr(dev); - ret = uclass_first_device(UCLASS_PINCTRL, &priv->pinctrl); + ret = uclass_first_device_err(UCLASS_PINCTRL, &priv->pinctrl); if (ret) return ret; - if (!priv->pinctrl) - return -ENODEV; uc_priv->gpio_count = ROCKCHIP_GPIOS_PER_BANK; end = strrchr(dev->name, '@'); |