From: Tsutomu Itoh Date: Wed, 30 Mar 2011 00:57:23 +0000 (+0000) Subject: Btrfs: fix compiler warning in file.c X-Git-Tag: v3.12-rc1~6163^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9149235a42ab93914434fff45c44b45023363f3;p=kernel%2Fkernel-generic.git Btrfs: fix compiler warning in file.c While compiling Btrfs, I got following messages: CC [M] fs/btrfs/file.o fs/btrfs/file.c: In function '__btrfs_buffered_write': fs/btrfs/file.c:909: warning: 'ret' may be used uninitialized in this function CC [M] fs/btrfs/tree-defrag.o This patch fixes compiler warning. Signed-off-by: Tsutomu Itoh Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 656bc0a..e621ea5 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -906,7 +906,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, unsigned long last_index; size_t num_written = 0; int nrptrs; - int ret; + int ret = 0; nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /