mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
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>
This commit is contained in:
parent
5abde384e3
commit
cc5f4f2875
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user