lkml.org 
[lkml]   [2013]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 081/116] drivers/memstick/core/ms_block.c: fix unreachable state in h_msb_read_page()
    Date
    3.12-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Roger Tseng <rogerable@realtek.com>

    commit a0e5a12fd18d47aa87a7a8c60ca5bc422b136564 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>

    ---
    drivers/memstick/core/ms_block.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- 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:



    \
     
     \ /
      Last update: 2013-11-27 05:21    [W:4.102 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site