From 8f423647be9c8b52518c5872d910e4127820d853 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 14 May 2014 10:01:55 +1000 Subject: [PATCH] swap-use-bdev_read_page-bdev_write_page-fix fix used-uninitialized bug mm/page_io.c: In function 'swap_readpage': mm/page_io.c:332: warning: 'ret' may be used uninitialized in this function Cc: Dave Chinner Cc: Dheeraj Reddy Cc: Hugh Dickins Cc: Matthew Wilcox Signed-off-by: Andrew Morton --- mm/page_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_io.c b/mm/page_io.c index 43d72203f76d..58b50d2901fe 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -329,7 +329,7 @@ out: int swap_readpage(struct page *page) { struct bio *bio; - int ret; + int ret = 0; struct swap_info_struct *sis = page_swap_info(page); VM_BUG_ON_PAGE(!PageLocked(page), page); -- 2.39.5