From 3f603cbbb8e175e545d6037a783e1ef82bab30f9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 11 Feb 2016 13:23:26 -0700 Subject: 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 --- arch/x86/cpu/ivybridge/sata.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch/x86/cpu/ivybridge/sata.c') diff --git a/arch/x86/cpu/ivybridge/sata.c b/arch/x86/cpu/ivybridge/sata.c index a59d9edce5..da6455b3bd 100644 --- a/arch/x86/cpu/ivybridge/sata.c +++ b/arch/x86/cpu/ivybridge/sata.c @@ -229,11 +229,9 @@ static int bd82x6x_sata_probe(struct udevice *dev) struct udevice *pch; int ret; - ret = uclass_first_device(UCLASS_PCH, &pch); + ret = uclass_first_device_err(UCLASS_PCH, &pch); if (ret) return ret; - if (!pch) - return -ENODEV; if (!(gd->flags & GD_FLG_RELOC)) bd82x6x_sata_enable(dev); -- cgit