- OSData *data;
- OSObject * obj;
- IOMapper * mapper = NULL;
- OSDictionary * matching;
-
- obj = device->copyProperty("iommu-parent");
- if (!obj)
- return (NULL);
-
- if ((mapper = OSDynamicCast(IOMapper, obj)))
- return (mapper);
-
- if ((data = OSDynamicCast(OSData, obj)))
- {
- if (index >= data->getLength() / sizeof(UInt32))
- goto done;
-
- data = OSData::withBytesNoCopy((UInt32 *)data->getBytesNoCopy() + index, sizeof(UInt32));
- if (!data)
- goto done;
-
- matching = IOService::propertyMatching(gIOMapperIDKey, data);
- data->release();
- }
- else
- matching = IOService::propertyMatching(gIOMapperIDKey, obj);
-
- if (matching)
- {
- mapper = OSDynamicCast(IOMapper, IOService::waitForMatchingService(matching));
- matching->release();
- }
+ OSData *data;
+ OSObject * obj;
+ IOMapper * mapper = NULL;
+ OSDictionary * matching;
+
+ obj = device->copyProperty("iommu-parent");
+ if (!obj) {
+ return NULL;
+ }
+
+ if ((mapper = OSDynamicCast(IOMapper, obj))) {
+ goto found;
+ }
+
+ if ((data = OSDynamicCast(OSData, obj))) {
+ if (index >= data->getLength() / sizeof(UInt32)) {
+ goto done;
+ }
+
+ data = OSData::withBytesNoCopy((UInt32 *)data->getBytesNoCopy() + index, sizeof(UInt32));
+ if (!data) {
+ goto done;
+ }
+
+ matching = IOService::propertyMatching(gIOMapperIDKey, data);
+ data->release();
+ } else {
+ matching = IOService::propertyMatching(gIOMapperIDKey, obj);
+ }
+
+ if (matching) {
+ mapper = OSDynamicCast(IOMapper, IOService::waitForMatchingService(matching));
+ matching->release();
+ }