summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-04-13 08:41:26 +0200
committerRichard Weinberger <richard@nod.at>2016-05-24 15:24:26 +0200
commitfadb3665bad96be8f696e4899ee0f618536d54c7 (patch)
tree7eb7fa6a48f528f04864dfad0ce58080911b6e4f /drivers/mtd/ubi
parentUBI: Modify wrong comment in ubi_leb_map function. (diff)
downloadlinux-fadb3665bad96be8f696e4899ee0f618536d54c7.tar.xz
linux-fadb3665bad96be8f696e4899ee0f618536d54c7.zip
UBI: Clean up return in ubi_remove_volume()
My static checker says that "err" can be uninitialized if "vol->reserved_pebs" is <= 0. I don't think that can happen but returning a literal is cleaner anyway. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/vmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 1ae17bb9b889..10059dfdc1b6 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -405,7 +405,7 @@ int ubi_remove_volume(struct ubi_volume_desc *desc, int no_vtbl)
if (!no_vtbl)
self_check_volumes(ubi);
- return err;
+ return 0;
out_err:
ubi_err(ubi, "cannot remove volume %d, error %d", vol_id, err);