public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Holger Brunck <holger.brunck@keymile.com>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] UBI: fix bug in image sequence number handling
Date: Mon, 13 Jul 2009 16:47:57 +0200	[thread overview]
Message-ID: <1247496477.3590.40.camel@pc005093.de.keymile.net> (raw)

Hi all, 
I have seen a bug on the current 2.6.28 backport for UBI. But the same
bug seems to be present in the current ubi-2.6.git.

 
This patch fixes a bug in the image seq. number handling in the
scanning level. The assignment of the image_seq was incorrect.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
 drivers/mtd/ubi/scan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 065c4ba..e337b0b 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -781,7 +781,7 @@ static int process_eb(struct ubi_device *ubi, struct
ubi_scan_info *si,
 			return -EINVAL;
 		}
 
-		image_seq = be32_to_cpu(ech->ec);
+		image_seq = be32_to_cpu(ech->image_seq);
 		if (!si->image_seq_set) {
 			ubi->image_seq = image_seq;
 			si->image_seq_set = 1;
-- 
1.6.0.1

Regards
Holger Brunck

             reply	other threads:[~2009-07-13 14:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 14:47 Holger Brunck [this message]
2009-07-14  5:43 ` [PATCH] UBI: fix bug in image sequence number handling Artem Bityutskiy

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=1247496477.3590.40.camel@pc005093.de.keymile.net \
    --to=holger.brunck@keymile.com \
    --cc=linux-mtd@lists.infradead.org \
    /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