Patchwork [02/17] mtd: do use mtd->point directly

login
register
mail settings
Submitter Artem Bityutskiy
Date Jan. 10, 2012, 1:35 p.m.
Message ID <1326202513.8847.20.camel@sauron.fi.intel.com>
Download mbox | patch
Permalink /patch/135242/
State New
Headers show

Comments

Artem Bityutskiy - Jan. 10, 2012, 1:35 p.m.
On Thu, 2012-01-05 at 15:03 -0800, Brian Norris wrote:
> > +++ b/fs/jffs2/erase.c
> > @@ -336,12 +336,11 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
> >        uint32_t ofs;
> >        size_t retlen;
> >        int ret = -EIO;
> 
> I think this initialization (ret = -EIO) was unnecessary in the first
> place and certainly is unnecessary now. Remove it?

Fair enough. I've pushed this patch to my tree:

From 162ab608ee94e01dc740c6cb55939f45aa184d44 Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Date: Tue, 10 Jan 2012 15:32:29 +0200
Subject: [PATCH] jffs2: do not initialize variable unnecessarily

Remove unnecessary initializer for a local variable.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 fs/jffs2/erase.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
index a01cdad..eafb8d3 100644
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -335,7 +335,7 @@  static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
 	void *ebuf;
 	uint32_t ofs;
 	size_t retlen;
-	int ret = -EIO;
+	int ret;
 	unsigned long *wordebuf;
 
 	ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen,