]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
swap-use-bdev_read_page-bdev_write_page-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 14 May 2014 00:01:55 +0000 (10:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 May 2014 00:01:55 +0000 (10:01 +1000)
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 <david@fromorbit.com>
Cc: Dheeraj Reddy <dheeraj.reddy@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_io.c

index 43d72203f76da9a6e7f2d6884681efb6a06a2113..58b50d2901fe2a43a916bae15daffb5c8c6f1cbe 100644 (file)
@@ -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);