summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Tseng <rogerable@realtek.com>2013-11-12 15:11:40 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 12:09:35 +0900
commita0e5a12fd18d47aa87a7a8c60ca5bc422b136564 (patch)
tree76dacfec53496b1c6795b5beefbc34c7df87832f
parentbe2d3f97e90cdf9f1523daaba705f320c3efaf00 (diff)
downloadop-kernel-dev-a0e5a12fd18d47aa87a7a8c60ca5bc422b136564.zip
op-kernel-dev-a0e5a12fd18d47aa87a7a8c60ca5bc422b136564.tar.gz
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: Roger Tseng <rogerable@realtek.com> Acked-by: Maxim Levitsky <maximlevitsky@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/memstick/core/ms_block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c
index 08e7023..9188ef5 100644
--- a/drivers/memstick/core/ms_block.c
+++ b/drivers/memstick/core/ms_block.c
@@ -401,7 +401,7 @@ again:
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:
OpenPOWER on IntegriCloud