提交 a0e5a12f 编写于 作者: R Roger Tseng 提交者: Linus Torvalds

drivers/memstick/core/ms_block.c: fix unreachable state in h_msb_read_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: NRoger Tseng <rogerable@realtek.com>
Acked-by: NMaxim Levitsky <maximlevitsky@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 be2d3f97
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册