lkml.org 
[lkml]   [2013]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/7] mmc: core: use common code path to return error
Date
Don't replicate how the *error is returned by mmc_start_req().

Signed-off-by: Grant Grundler <grundler@chromium.org>
---
drivers/mmc/core/core.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 4d5de98..deb0ee5 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -538,13 +538,12 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
if (saved_areq) {
saved_err = mmc_wait_for_data_req_done(host, saved_areq->mrq, areq);
if (saved_err == MMC_BLK_NEW_REQUEST) {
- if (error)
- *error = saved_err;
/*
* The previous request was not completed,
* nothing to return
*/
- return NULL;
+ saved_areq = NULL;
+ goto set_error;
}
/*
* Check BKOPS urgency for each R1 response
@@ -570,8 +569,10 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
if (saved_areq)
mmc_post_req(host, saved_areq->mrq, 0);

+set_error:
if (error)
*error = saved_err;
+
return saved_areq;
}
EXPORT_SYMBOL(mmc_start_req);
--
1.8.4


\
 
 \ /
  Last update: 2013-09-26 21:41    [W:1.461 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site