1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-18 08:23:24 +02:00

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>
This commit is contained in:
Simon Glass
2016-02-11 13:23:26 -07:00
parent b06750501f
commit 3f603cbbb8
17 changed files with 30 additions and 54 deletions

View File

@@ -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, '@');