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

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

Merge "drm/msm: Don't allow zero sized buffer objects"

parents e650018e f88d0c45
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -778,6 +778,13 @@ struct drm_gem_object *msm_gem_new(struct drm_device *dev,

	size = PAGE_ALIGN(size);

	/*
	 * Disallow zero sized objects as they make the underlying
	 * infrastructure grumpy
	 */
	if (!size)
		return ERR_PTR(-EINVAL);

	ret = msm_gem_new_impl(dev, size, flags, &obj);
	if (ret)
		goto fail;