Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 686b9ff3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm: use vmalloc/vfree for blob allocation"

parents eeed7df1 660de08a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -530,7 +530,7 @@ static void drm_property_free_blob(struct kref *kref)

	drm_mode_object_unregister(blob->dev, &blob->base);

	kfree(blob);
	vfree(blob);
}

/**
@@ -557,7 +557,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length,
	if (!length || length > ULONG_MAX - sizeof(struct drm_property_blob))
		return ERR_PTR(-EINVAL);

	blob = kzalloc(sizeof(struct drm_property_blob)+length, GFP_KERNEL);
	blob = vmalloc(sizeof(struct drm_property_blob)+length);
	if (!blob)
		return ERR_PTR(-ENOMEM);

@@ -573,7 +573,7 @@ drm_property_create_blob(struct drm_device *dev, size_t length,
	ret = drm_mode_object_get_reg(dev, &blob->base, DRM_MODE_OBJECT_BLOB,
				      true, drm_property_free_blob);
	if (ret) {
		kfree(blob);
		vfree(blob);
		return ERR_PTR(-EINVAL);
	}