diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index fc56c112a7deb89aea3424f696ad3f777d9029fd..9903bb0097a6f12183cd5d5f9a73087c70d52db0 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2540,7 +2540,7 @@ intel_rotate_fb_obj_pages(struct i915_ggtt_view *ggtt_view,
 	struct sg_table *st;
 	unsigned int tile_pitch, tile_height;
 	unsigned int width_pages, height_pages;
-	int ret = ENOMEM;
+	int ret = -ENOMEM;
 
 	pages = obj->base.size / PAGE_SIZE;