Commit 2ab934b8 authored by Jeff Garzik's avatar Jeff Garzik

drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var

Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 0d480db8
...@@ -368,7 +368,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf, ...@@ -368,7 +368,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf,
int err, pnum, scrub = 0, idx = vol_id2idx(ubi, vol_id); int err, pnum, scrub = 0, idx = vol_id2idx(ubi, vol_id);
struct ubi_vid_hdr *vid_hdr; struct ubi_vid_hdr *vid_hdr;
struct ubi_volume *vol = ubi->volumes[idx]; struct ubi_volume *vol = ubi->volumes[idx];
uint32_t crc, crc1; uint32_t crc;
err = leb_read_lock(ubi, vol_id, lnum); err = leb_read_lock(ubi, vol_id, lnum);
if (err) if (err)
...@@ -451,7 +451,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf, ...@@ -451,7 +451,7 @@ int ubi_eba_read_leb(struct ubi_device *ubi, int vol_id, int lnum, void *buf,
} }
if (check) { if (check) {
crc1 = crc32(UBI_CRC32_INIT, buf, len); uint32_t crc1 = crc32(UBI_CRC32_INIT, buf, len);
if (crc1 != crc) { if (crc1 != crc) {
ubi_warn("CRC error: calculated %#08x, must be %#08x", ubi_warn("CRC error: calculated %#08x, must be %#08x",
crc1, crc); crc1, crc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment