Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 467871d9 authored by Subhash Jadavani's avatar Subhash Jadavani
Browse files

mmc: core: prevent calling ->post_req 2 times if request submit fails



Currently we might end up calling ->post_req() 2 times if we failed to
submit the request to host driver. This change fixes this issue.

Change-Id: I10b681ab955e0a9126b22df68d3601b75328c949
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent b06f2ad5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1605,8 +1605,7 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
	if (host->areq)
		mmc_post_req(host, host->areq->mrq, 0);

	 /* Cancel a prepared request if it was not started. */
	if ((err || start_err) && areq)
	if (err && areq)
		mmc_post_req(host, areq->mrq, -EINVAL);

	if (err)