]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: GOP fix for no display
authorRob Clark <robdclark@gmail.com>
Fri, 4 Aug 2017 11:52:03 +0000 (07:52 -0400)
committerAlexander Graf <agraf@suse.de>
Fri, 11 Aug 2017 11:49:23 +0000 (13:49 +0200)
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>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_gop.c

index e063e0c79b7e2f9f767eb47e44e8d5d867447c79..411a8c9226154d922ddcc948c96f1ab7660f7c23 100644 (file)
@@ -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);