]> err.no Git - linux-2.6/commitdiff
memstick: make sure number of command retries is exactly as specified
authorAlex Dubov <oakad@yahoo.com>
Mon, 10 Mar 2008 18:43:38 +0000 (11:43 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Mar 2008 01:01:18 +0000 (18:01 -0700)
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>
drivers/memstick/core/memstick.c

index 3c97bac4e47bbc642f62006b615208a6179f3ec3..decd6a49fd5a4243a04eaf43621a73da5974e38f 100644 (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;