Skip to content

Commit

Permalink
mtd: devices: elm: fix elm_context_save() and elm_context_restore() f…
Browse files Browse the repository at this point in the history
…unctions

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>
  • Loading branch information
Ted Juan authored and Brian Norris committed Jul 5, 2014
1 parent 7171511 commit 6938ad4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mtd/devices/elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,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;
}
Expand Down Expand Up @@ -520,6 +521,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;
}
Expand Down

0 comments on commit 6938ad4

Please sign in to comment.