Skip to content

Commit 6938ad4

Browse files
ted-juancomputersforpeace
authored andcommitted
mtd: devices: elm: fix elm_context_save() and elm_context_restore() functions
These two function's switch case lack the 'break' that make them always return error. Signed-off-by: Ted Juan <ted.juan@gmail.com> Acked-by: Pekon Gupta <pekon@ti.com> Cc: <stable@vger.kernel.org> # 3.12.x+ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
1 parent 7171511 commit 6938ad4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/mtd/devices/elm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ static int elm_context_save(struct elm_info *info)
475475
ELM_SYNDROME_FRAGMENT_1 + offset);
476476
regs->elm_syndrome_fragment_0[i] = elm_read_reg(info,
477477
ELM_SYNDROME_FRAGMENT_0 + offset);
478+
break;
478479
default:
479480
return -EINVAL;
480481
}
@@ -520,6 +521,7 @@ static int elm_context_restore(struct elm_info *info)
520521
regs->elm_syndrome_fragment_1[i]);
521522
elm_write_reg(info, ELM_SYNDROME_FRAGMENT_0 + offset,
522523
regs->elm_syndrome_fragment_0[i]);
524+
break;
523525
default:
524526
return -EINVAL;
525527
}

0 commit comments

Comments
 (0)