⬢ DragonFlyBSD Kernel Audit
DF-4194 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/drm/drm_connector.c b/sys/dev/drm/drm_connector.c
--- a/sys/dev/drm/drm_connector.c
+++ b/sys/dev/drm/drm_connector.c
@@ -1914,7 +1914,7 @@
 
 	tg = kzalloc(sizeof(*tg), GFP_KERNEL);
 	if (!tg)
-		return ERR_PTR(-ENOMEM);
+		return NULL;
 
 	kref_init(&tg->refcount);
 	memcpy(tg->group_data, topology, 8);
@@ -1926,7 +1926,7 @@
 		tg->id = ret;
 	} else {
 		kfree(tg);
-		tg = ERR_PTR(ret);
+		tg = NULL;
 	}
 
 	mutex_unlock(&dev->mode_config.idr_mutex);