mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <rogerable@realtek.com>
To: <devel@linuxdriverproject.org>, <linux-kernel@vger.kernel.org>
Cc: <maximlevitsky@gmail.com>, <gregkh@linuxfoundation.org>,
	<oakad@yahoo.com>, <wei_wang@realsil.com.cn>,
	<micky_ching@realsil.com.cn>, Roger Tseng <rogerable@realtek.com>
Subject: [PATCH] memstick: fix unreachable state in h_msb_read_page() in ms_block.c
Date: Wed, 30 Oct 2013 15:54:11 +0800	[thread overview]
Message-ID: <1383119651-31317-1-git-send-email-rogerable@realtek.com> (raw)

From: Roger Tseng <rogerable@realtek.com>

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 transiting to MSB_RP_RECIVE_STATUS_REG right after
MSB_RP_SEND_READ_STATUS_REG.

Signed-off-by: Roger Tseng <rogerable@realtek.com>
---
 drivers/memstick/core/ms_block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


             reply	other threads:[~2013-10-30  7:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30  7:54 rogerable [this message]
2013-11-02 23:28 ` Maxim Levitsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383119651-31317-1-git-send-email-rogerable@realtek.com \
    --to=rogerable@realtek.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    --cc=micky_ching@realsil.com.cn \
    --cc=oakad@yahoo.com \
    --cc=wei_wang@realsil.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®