static struct ubi_volume *ubi_find_volume(char *volume)
{
- struct ubi_volume *vol = NULL;
+ struct ubi_volume *vol;
int i;
for (i = 0; i < ubi->vtbl_slots; i++) {
static int ubi_volume_continue_write(char *volume, void *buf, size_t size)
{
- int err = 1;
+ int err;
struct ubi_volume *vol;
vol = ubi_find_volume(volume);
int ubi_volume_begin_write(char *volume, void *buf, size_t size,
size_t full_size)
{
- int err = 1;
- int rsvd_bytes = 0;
+ int err;
+ int rsvd_bytes;
struct ubi_volume *vol;
vol = ubi_find_volume(volume);
int ubi_part(char *part_name, const char *vid_header_offset)
{
struct mtd_info *mtd;
- int err = 0;
+ int err;
if (ubi && ubi->mtd && !strcmp(ubi->mtd->name, part_name)) {
printf("UBI partition '%s' already selected\n", part_name);
static int do_ubi(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- int64_t size = 0;
+ int64_t size;
ulong addr = 0;
bool skipcheck = false;