From: Andrew Morton Date: Wed, 14 May 2014 00:01:55 +0000 (+1000) Subject: swap-use-bdev_read_page-bdev_write_page-fix X-Git-Tag: next-20140516~2^2~294 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8f423647be9c8b52518c5872d910e4127820d853;p=karo-tx-linux.git 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 --- 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);