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: v2.6.25-rc6~77 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29196dc67e1b76ce84e25228783f6b8a3c48e9dd;hp=d114ad54ffb020dc781b6159c1c2f391c6ec418f;p=linux-2.6 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 3c97bac4e4..decd6a49fd 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;