memstick: make sure number of command retries is exactly as specified

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Alex Dubov 2008-03-10 11:43:38 -07:00 committed by Linus Torvalds
parent d114ad54ff
commit 29196dc67e

View File

@ -236,7 +236,7 @@ int memstick_next_req(struct memstick_host *host, struct memstick_request **mrq)
rc = host->card->next_request(host->card, mrq);
if (!rc)
host->retries = cmd_retries;
host->retries = cmd_retries > 1 ? cmd_retries - 1 : 1;
else
*mrq = NULL;