Browse Source

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>
Dan Carpenter 9 năm trước cách đây
mục cha
commit
fadb3665ba
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/mtd/ubi/vmt.c

+ 1 - 1
drivers/mtd/ubi/vmt.c

@@ -405,7 +405,7 @@ int ubi_remove_volume(struct ubi_volume_desc *desc, int no_vtbl)
 	if (!no_vtbl)
 	if (!no_vtbl)
 		self_check_volumes(ubi);
 		self_check_volumes(ubi);
 
 
-	return err;
+	return 0;
 
 
 out_err:
 out_err:
 	ubi_err(ubi, "cannot remove volume %d, error %d", vol_id, err);
 	ubi_err(ubi, "cannot remove volume %d, error %d", vol_id, err);