aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-10-14 06:01:58 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-10-14 06:10:21 -0400
commitcc5f4f28755b3b152297fd7bc3e03781dd8008e2 (patch)
tree8b09a2c0bec66a588f0cc5a5dfda5fe40801c07d /drivers/mtd/ubi
parent5abde384e350e44e9d0584238b9ee327f2062f93 (diff)
UBI: return correct error code
Fix the following warning: drivers/mtd/ubi/eba.c: In function 'ubi_eba_init_scan': drivers/mtd/ubi/eba.c:1116: warning: 'err' may be used uninitialized in this function Pointed-to-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/eba.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 7b7add6da12..1297732f4db 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -1188,6 +1188,7 @@ int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si)
1188 if (ubi->avail_pebs < EBA_RESERVED_PEBS) { 1188 if (ubi->avail_pebs < EBA_RESERVED_PEBS) {
1189 ubi_err("no enough physical eraseblocks (%d, need %d)", 1189 ubi_err("no enough physical eraseblocks (%d, need %d)",
1190 ubi->avail_pebs, EBA_RESERVED_PEBS); 1190 ubi->avail_pebs, EBA_RESERVED_PEBS);
1191 err = -ENOSPC;
1191 goto out_free; 1192 goto out_free;
1192 } 1193 }
1193 ubi->avail_pebs -= EBA_RESERVED_PEBS; 1194 ubi->avail_pebs -= EBA_RESERVED_PEBS;