Skip to content

Commit 74dfb60

Browse files
roger-tttsenggregkh
authored andcommitted
drivers/memstick/core/ms_block.c: fix unreachable state in h_msb_read_page()
commit a0e5a12 upstream. 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 <rogerable@realtek.com> Acked-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 425a819 commit 74dfb60

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/memstick/core/ms_block.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static int h_msb_read_page(struct memstick_dev *card,
401401
sizeof(struct ms_status_register)))
402402
return 0;
403403

404-
msb->state = MSB_RP_RECEIVE_OOB_READ;
404+
msb->state = MSB_RP_RECIVE_STATUS_REG;
405405
return 0;
406406

407407
case MSB_RP_RECIVE_STATUS_REG:

0 commit comments

Comments
 (0)