Commit b2a13535 authored by Ted Juan's avatar Ted Juan Committed by Jiri Slaby

mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions

commit 6938ad40 upstream.

These two function's switch case lack the 'break' that make them always
return error.
Signed-off-by: default avatarTed Juan <ted.juan@gmail.com>
Acked-by: default avatarPekon Gupta <pekon@ti.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent bde32a05
......@@ -428,6 +428,7 @@ static int elm_context_save(struct elm_info *info)
ELM_SYNDROME_FRAGMENT_1 + offset);
regs->elm_syndrome_fragment_0[i] = elm_read_reg(info,
ELM_SYNDROME_FRAGMENT_0 + offset);
break;
default:
return -EINVAL;
}
......@@ -466,6 +467,7 @@ static int elm_context_restore(struct elm_info *info)
regs->elm_syndrome_fragment_1[i]);
elm_write_reg(info, ELM_SYNDROME_FRAGMENT_0 + offset,
regs->elm_syndrome_fragment_0[i]);
break;
default:
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment