DragonFlyBSD Kernel Audit
DF-1908 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/drm/amd/amdgpu/amdgpu_acp.c b/sys/dev/drm/amd/amdgpu/amdgpu_acp.c
--- a/sys/dev/drm/amd/amdgpu/amdgpu_acp.c
+++ b/sys/dev/drm/amd/amdgpu/amdgpu_acp.c
@@ -170,7 +170,8 @@
 	snprintf(auto_dev_name, sizeof(auto_dev_name),
 		 "%s.%d.auto", device_name, r);
 	dev = bus_find_device_by_name(&platform_bus_type, NULL, auto_dev_name);
-	dev_info(dev, "device %s added to pm domain\n", auto_dev_name);
+	if (dev)
+		dev_info(dev, "device %s added to pm domain\n", auto_dev_name);
 
 	return dev;
 }