From: Alex Dubov Date: Mon, 10 Mar 2008 18:43:38 +0000 (-0700) Subject: memstick: make sure number of command retries is exactly as specified X-Git-Tag: firefly_0821_release~22059 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=29196dc67e1b76ce84e25228783f6b8a3c48e9dd;p=firefly-linux-kernel-4.4.55.git memstick: make sure number of command retries is exactly as specified Signed-off-by: Alex Dubov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index 3c97bac4e47b..decd6a49fd5a 100644 --- a/drivers/memstick/core/memstick.c +++ b/drivers/memstick/core/memstick.c @@ -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;