From patchwork Thu Sep 26 19:22:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Grundler X-Patchwork-Id: 2950991 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B19EABFF0B for ; Thu, 26 Sep 2013 19:24:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 955D3202C8 for ; Thu, 26 Sep 2013 19:24:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C635201ED for ; Thu, 26 Sep 2013 19:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754315Ab3IZTXv (ORCPT ); Thu, 26 Sep 2013 15:23:51 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:63073 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754250Ab3IZTXo (ORCPT ); Thu, 26 Sep 2013 15:23:44 -0400 Received: by mail-pb0-f41.google.com with SMTP id rp2so1563427pbb.28 for ; Thu, 26 Sep 2013 12:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Z7MesGn8MWKIYL8qR7NIlP+kf/BWSjtiWqJoZmVJYM8=; b=KcEs9MPEzjPeyPSMBl6YbCPhbk8hQgZplEgIm+jFObqnQNHSN56zGo8zUFPG56PrzE nwZQKxuKltQs9pqzGc1sD0cWuRBXWSOFlXO6JBZAiOqgARn8jNuKcsWd4dXHjJfhloj/ g8W7vNbF2LUkNhE0eFvC/agF1H1V78ZoFmE80= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Z7MesGn8MWKIYL8qR7NIlP+kf/BWSjtiWqJoZmVJYM8=; b=EYPYbhhFZ0nN9+JPJJFTv4730QMNzdikkp3XnlR0WdEDFuZdA6hufcFZewwk3kbl1x Ekfdq6eUuymtYnzgGGomDUbQNORwKSbGGL1wB9j7iRkvkZhQ1qu2irF4YkbgIIGvPAl5 6ZqtAELdn1iL0iUC0hRfZTNfYyOX6wSJ56zhYoplFOubv/m+XMldiRmxJYWEar951uSv UnUxwvo2FUTg2OtZs2OmI3iNpFrtA1fkfuUF+alwTB3UPPDtjmg7fDX1OMb/pe7AUOgg a2c7zigeQxTClTw80iloJY/LwhHVTRQGJeeReucbwHIBupDCf5xXmbAIlG2oRECqVJZY QyJA== X-Gm-Message-State: ALoCoQn3B3TyV/8DRLTSQ8SHLzVaq7w8b9F/3/wzx2deoqDOQWhBRYTR0KVH9JcvXowrWJrZbYu8 X-Received: by 10.66.189.98 with SMTP id gh2mr7370939pac.60.1380223423834; Thu, 26 Sep 2013 12:23:43 -0700 (PDT) Received: from firesword.mtv.corp.google.com (firesword.mtv.corp.google.com [172.22.73.90]) by mx.google.com with ESMTPSA id ar1sm3900253pbc.34.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 12:23:43 -0700 (PDT) From: Grant Grundler To: Chris Ball , Ulf Hansson , Seungwon Jeon Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Grundler Subject: [PATCH 4/7] mmc: core: use common code path to return error Date: Thu, 26 Sep 2013 12:22:57 -0700 Message-Id: <1380223380-22451-5-git-send-email-grundler@chromium.org> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1380223380-22451-1-git-send-email-grundler@chromium.org> References: <1380223380-22451-1-git-send-email-grundler@chromium.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Don't replicate how the *error is returned by mmc_start_req(). Signed-off-by: Grant Grundler --- 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);