Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc5f4f28755b3b152297fd7bc3e03781dd8008e2
Commit:     cc5f4f28755b3b152297fd7bc3e03781dd8008e2
Parent:     5abde384e350e44e9d0584238b9ee327f2062f93
Author:     Artem Bityutskiy <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 14 13:01:58 2007 +0300
Committer:  Artem Bityutskiy <[EMAIL PROTECTED]>
CommitDate: Sun Oct 14 13:10:21 2007 +0300

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Artem Bityutskiy <[EMAIL PROTECTED]>
---
 drivers/mtd/ubi/eba.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 7b7add6..1297732 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)
        if (ubi->avail_pebs < EBA_RESERVED_PEBS) {
                ubi_err("no enough physical eraseblocks (%d, need %d)",
                        ubi->avail_pebs, EBA_RESERVED_PEBS);
+               err = -ENOSPC;
                goto out_free;
        }
        ubi->avail_pebs -= EBA_RESERVED_PEBS;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to