]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arch: imx: fix incorrect shutdown call for inactive video devices
authorBrian Ruley <brian.ruley@gehealthcare.com>
Fri, 13 Feb 2026 08:49:50 +0000 (10:49 +0200)
committerFabio Estevam <festevam@gmail.com>
Sat, 28 Feb 2026 18:31:49 +0000 (15:31 -0300)
Somehow I missed that ipuv3_fb_shutdown() can be called for inactive
devices, resulting in invalid memory access and preventing the kernel
from booting.

Fixes: 32da6773f62 ("video: imx: ipuv3: refactor to use dm-managed state")
Signed-off-by: Brian Ruley <brian.ruley@gehealthcare.com>
Reviewed-by: David Zang <davidzangcs@gmail.com>
arch/arm/mach-imx/cpu.c

index 20c741283cdf45a7c89222e646a04e2bb6c25f44..8af45e14707d662edb042d1757bee8236655c047 100644 (file)
@@ -310,7 +310,8 @@ void arch_preboot_os(void)
        /* disable video before launching O/S */
        rc = uclass_find_first_device(UCLASS_VIDEO, &dev);
        while (!rc && dev) {
-               ipuv3_fb_shutdown(dev);
+               if (device_active(dev))
+                       ipuv3_fb_shutdown(dev);
                uclass_find_next_device(&dev);
        }
 #endif