]> git.sur5r.net Git - u-boot/blobdiff - drivers/video/video-uclass.c
dm: video: Don't do anything in alloc_fb() when plat->size is zero
[u-boot] / drivers / video / video-uclass.c
index b6dd0f5a58387c4f37f73fe25079a507a84b0c72..11ca7937dc817ed8c40c392182aa8bd38d4f5b8f 100644 (file)
@@ -54,6 +54,9 @@ static ulong alloc_fb(struct udevice *dev, ulong *addrp)
        struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
        ulong base, align, size;
 
+       if (!plat->size)
+               return 0;
+
        align = plat->align ? plat->align : 1 << 20;
        base = *addrp - plat->size;
        base &= ~(align - 1);