Skip to content

Commit

Permalink
drivers/memstick/core/ms_block.c: fix unreachable state in h_msb_read…
Browse files Browse the repository at this point in the history
…_page()

In h_msb_read_page() in ms_block.c, flow never reaches case
MSB_RP_RECIVE_STATUS_REG.  This causes error when MEMSTICK_INT_ERR is
encountered and status error bits are going to be examined, but the status
will never be copied back.

Fix it by transitioning to MSB_RP_RECIVE_STATUS_REG right after
MSB_RP_SEND_READ_STATUS_REG.

Signed-off-by: Roger Tseng <[email protected]>
Acked-by: Maxim Levitsky <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
roger-tttseng authored and torvalds committed Nov 13, 2013
1 parent be2d3f9 commit a0e5a12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/memstick/core/ms_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static int h_msb_read_page(struct memstick_dev *card,
sizeof(struct ms_status_register)))
return 0;

msb->state = MSB_RP_RECEIVE_OOB_READ;
msb->state = MSB_RP_RECIVE_STATUS_REG;
return 0;

case MSB_RP_RECIVE_STATUS_REG:
Expand Down

0 comments on commit a0e5a12

Please sign in to comment.