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

Commit 69df4031 authored by Alan Kwong's avatar Alan Kwong
Browse files

drm: use vzalloc for blob allocation



Use vzalloc instead of vmalloc to initialize blob with zero.
This is required of the base drm_mode_object as well as
drm_property_blob.

Change-Id: Ic1d1ca4daeaa552a20a781df958ad7ecc098bbf0
Signed-off-by: default avatarAlan Kwong <akwong@codeaurora.org>
parent a8118139
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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))
	if (!length || length > ULONG_MAX - sizeof(struct drm_property_blob))
		return ERR_PTR(-EINVAL);
		return ERR_PTR(-EINVAL);


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