summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJanne Grunau <[email protected]>2024-11-23 22:44:04 +0100
committerTom Rini <[email protected]>2024-11-24 15:41:28 -0600
commit544a76bac3393045e86a56cc5dfe2477e437c59b (patch)
tree3fc66d36b134469d47b48cd0d4d89ed7012527df /drivers
parentcca05617a8f585f3a98a8fa82f75cc68a530d771 (diff)
iommu: apple: Mark device with DM_FLAG_VITAL
Avoids NULL pointer dereferences in apple_dart_unmap when the iommu device is removed before its user. U-boot's device model does not track dependencies between devices. Observed on a M1 Ultra Mac Studio with v2024.10. Acked-by: Mark Kettenis <[email protected]> Signed-off-by: Janne Grunau <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/apple_dart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/apple_dart.c b/drivers/iommu/apple_dart.c
index 3e9e7819e51..bfd4ad20105 100644
--- a/drivers/iommu/apple_dart.c
+++ b/drivers/iommu/apple_dart.c
@@ -322,5 +322,5 @@ U_BOOT_DRIVER(apple_dart) = {
.ops = &apple_dart_ops,
.probe = apple_dart_probe,
.remove = apple_dart_remove,
- .flags = DM_FLAG_OS_PREPARE
+ .flags = DM_FLAG_OS_PREPARE | DM_FLAG_VITAL
};