linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis de Bethencourt <luisbg@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
	mhocko@suse.com, hannes@cmpxchg.org, vdavydov@virtuozzo.com,
	Luis de Bethencourt <luisbg@osg.samsung.com>,
	Luis de Bethencourt <luisbg@osg.samsung.org>
Subject: [PATCH] befs/linuxvfs: remove unneeded initialization
Date: Sat, 28 May 2016 15:07:57 +0100	[thread overview]
Message-ID: <1464444477-5805-1-git-send-email-luisbg@osg.samsung.com> (raw)

res is initialized to 0 in befs_get_block() but this value will be
overwritten before it is used.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.org>
---
Hi,

Saw this small issue while reading the code. BeFS is very interesting, and
reading this code is very educational after reading Dominic Giampaolo's book.

Will continue reading and send more fixes if I see any.

Thanks,
Luis

 fs/befs/linuxvfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 7da05b1..2551066 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -120,7 +120,7 @@ befs_get_block(struct inode *inode, sector_t block,
 	struct super_block *sb = inode->i_sb;
 	befs_data_stream *ds = &BEFS_I(inode)->i_data.ds;
 	befs_block_run run = BAD_IADDR;
-	int res = 0;
+	int res;
 	ulong disk_off;
 
 	befs_debug(sb, "---> befs_get_block() for inode %lu, block %ld",
-- 
2.5.1

                 reply	other threads:[~2016-05-28 14:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464444477-5805-1-git-send-email-luisbg@osg.samsung.com \
    --to=luisbg@osg.samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luisbg@osg.samsung.org \
    --cc=mhocko@suse.com \
    --cc=vdavydov@virtuozzo.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).