public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] efi_loader: GOP fix for no display
@ 2017-08-04 11:52 Rob Clark
  2017-08-04 11:52 ` [U-Boot] [PATCH] usb: kbd: don't fail with iomux Rob Clark
  2017-08-31 16:20 ` [U-Boot] efi_loader: GOP fix for no display Alexander Graf
  0 siblings, 2 replies; 6+ messages in thread
From: Rob Clark @ 2017-08-04 11:52 UTC (permalink / raw)
  To: u-boot

uclass_first_device() returns 0 if there is no device, but error if
there is a device that failed to probe.

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 lib/efi_loader/efi_gop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index e063e0c79b..411a8c9226 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -137,7 +137,7 @@ int efi_gop_register(void)
 	struct udevice *vdev;
 
 	/* We only support a single video output device for now */
-	if (uclass_first_device(UCLASS_VIDEO, &vdev))
+	if (uclass_first_device(UCLASS_VIDEO, &vdev) || !vdev)
 		return -1;
 
 	struct video_priv *priv = dev_get_uclass_priv(vdev);
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-31 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 11:52 [U-Boot] [PATCH] efi_loader: GOP fix for no display Rob Clark
2017-08-04 11:52 ` [U-Boot] [PATCH] usb: kbd: don't fail with iomux Rob Clark
2017-08-04 12:35   ` Bin Meng
2017-08-04 12:51     ` Rob Clark
2017-08-04 13:08       ` Bin Meng
2017-08-31 16:20 ` [U-Boot] efi_loader: GOP fix for no display Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox