[PATCH 38/48] staging: etnaviv: fix 'ret' may be used uninitialized in this function

Lucas Stach l.stach at pengutronix.de
Fri Sep 25 04:57:50 PDT 2015


From: Christian Gmeiner <christian.gmeiner at gmail.com>

Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
 drivers/staging/etnaviv/etnaviv_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/etnaviv/etnaviv_gem.c b/drivers/staging/etnaviv/etnaviv_gem.c
index 5c2462d6130d..3e08f0694021 100644
--- a/drivers/staging/etnaviv/etnaviv_gem.c
+++ b/drivers/staging/etnaviv/etnaviv_gem.c
@@ -752,7 +752,7 @@ struct get_pages_work {
 static struct page **etnaviv_gem_userptr_do_get_pages(
 	struct etnaviv_gem_object *etnaviv_obj, struct mm_struct *mm, struct task_struct *task)
 {
-	int ret, pinned, npages = etnaviv_obj->base.size >> PAGE_SHIFT;
+	int ret = 0, pinned, npages = etnaviv_obj->base.size >> PAGE_SHIFT;
 	struct page **pvec;
 	uintptr_t ptr;
 
-- 
2.5.1



More information about the dri-devel mailing list