[Intel-gfx] [PATCH 2/2] drm/i915: [dinq] fix two instances -Wunitialized

Ben Widawsky ben at bwidawsk.net
Wed Feb 15 14:42:43 CET 2012


Introduced in commit 8461d226 and 8c59967c

Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_gem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 2031cc7..3059082 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -387,7 +387,7 @@ i915_gem_shmem_pread_slow(struct drm_device *dev,
 	char __user *user_data;
 	ssize_t remain;
 	loff_t offset;
-	int shmem_page_offset, page_length, ret;
+	int shmem_page_offset, page_length, ret = 0;
 	int obj_do_bit17_swizzling, page_do_bit17_swizzling;
 
 	user_data = (char __user *) (uintptr_t) args->data_ptr;
@@ -794,7 +794,7 @@ i915_gem_shmem_pwrite_slow(struct drm_device *dev,
 	ssize_t remain;
 	loff_t offset;
 	char __user *user_data;
-	int shmem_page_offset, page_length, ret;
+	int shmem_page_offset, page_length, ret = 0;
 	int obj_do_bit17_swizzling, page_do_bit17_swizzling;
 
 	user_data = (char __user *) (uintptr_t) args->data_ptr;
-- 
1.7.9.1




More information about the Intel-gfx mailing list