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

Commit f94982b0 authored by Ben Widawsky's avatar Ben Widawsky Committed by Daniel Vetter
Browse files

drm/i915: Allocate the proper size for contexts.



Whoops. This was fixed previously, but not sure how it got lost. It's
not needed for -fixes or stable because at the moment
drm_i915_file_private is way bigger than i915_hw_context (by 120 bytes
on my 64b build).

Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 0e8b3d3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -146,7 +146,7 @@ create_hw_context(struct drm_device *dev,
	struct i915_hw_context *ctx;
	struct i915_hw_context *ctx;
	int ret, id;
	int ret, id;


	ctx = kzalloc(sizeof(struct drm_i915_file_private), GFP_KERNEL);
	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
	if (ctx == NULL)
	if (ctx == NULL)
		return ERR_PTR(-ENOMEM);
		return ERR_PTR(-ENOMEM);