linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] befs/linuxvfs: remove unneeded initialization
@ 2016-05-28 14:07 Luis de Bethencourt
  0 siblings, 0 replies; only message in thread
From: Luis de Bethencourt @ 2016-05-28 14:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, viro, mhocko, hannes, vdavydov, Luis de Bethencourt,
	Luis de Bethencourt

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-28 14:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-28 14:07 [PATCH] befs/linuxvfs: remove unneeded initialization Luis de Bethencourt

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).