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

Commit 8bfc478f authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Silence allocation failure during sg_trim()



As trimming the sg table is merely an optimisation that gracefully fails
if we cannot allocate a new table, we do not need to report the failure
either.

Fixes: 0c40ce13 ("drm/i915: Trim the object sg table")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161223145804.6605-4-chris@chris-wilson.co.uk
parent e5facdf9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2326,7 +2326,7 @@ static void i915_sg_trim(struct sg_table *orig_st)
	if (orig_st->nents == orig_st->orig_nents)
		return;

	if (sg_alloc_table(&new_st, orig_st->nents, GFP_KERNEL))
	if (sg_alloc_table(&new_st, orig_st->nents, GFP_KERNEL | __GFP_NOWARN))
		return;

	new_sg = new_st.sgl;