From patchwork Thu Dec 18 09:41:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 42411 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 19B0E26C6B for ; Thu, 18 Dec 2014 09:42:13 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id c13sf601716eek.10 for ; Thu, 18 Dec 2014 01:42:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=7TQO3ASmaidZucc0+FntNXbYlQJLuTnPqhXqwMTnriU=; b=HR/5k+2/YkYwY47rJDeL6QhRgL3RNI5Yp/U0Q2Dn67idwE5Cxj16OEMBUmD8kasPjU f/b6qBWMZvxiJEv7YalYyTPo5ut6ekntsjdVdfp8lbXexszpUovbFEJvve3q/eE45sNW 7WVxDg+IVQsWBxqV5U8L+VLYgzncnmy6FWo8YA2Mngt+k/DylpKv8safcix6QR+Jtp0A DgWr5EPiIzj77C/DOopLEEP26LwBGy6aLHm1Cs6cBVRpurhoFLnquOUn6/VYsoewgAI4 t73Nrm4rQIlY/mS3w7vGsvQ2TD0YkTRncUr7oSZNOm/9pesBi3kvtmg3Kg5A6JrNUZZC OHNg== X-Gm-Message-State: ALoCoQkpzh6yETXfbvMlYbHqFvGClkov4ZXAysko2acwjVM4jZtnJBgkZcZLekrgZLZy94yyUwdc X-Received: by 10.152.44.225 with SMTP id h1mr187556lam.2.1418895732353; Thu, 18 Dec 2014 01:42:12 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.135 with SMTP id s7ls1230554las.33.gmail; Thu, 18 Dec 2014 01:42:12 -0800 (PST) X-Received: by 10.152.19.71 with SMTP id c7mr1177165lae.79.1418895732140; Thu, 18 Dec 2014 01:42:12 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id 8si6283960lao.84.2014.12.18.01.42.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Dec 2014 01:42:12 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id l4so629135lbv.39 for ; Thu, 18 Dec 2014 01:42:12 -0800 (PST) X-Received: by 10.112.14.6 with SMTP id l6mr1177362lbc.91.1418895732057; Thu, 18 Dec 2014 01:42:12 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp1645928lbb; Thu, 18 Dec 2014 01:42:10 -0800 (PST) X-Received: by 10.180.20.50 with SMTP id k18mr3372862wie.31.1418895722813; Thu, 18 Dec 2014 01:42:02 -0800 (PST) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com. [209.85.212.172]) by mx.google.com with ESMTPS id p5si11151569wjp.7.2014.12.18.01.42.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Dec 2014 01:42:02 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.212.172 as permitted sender) client-ip=209.85.212.172; Received: by mail-wi0-f172.google.com with SMTP id n3so1097215wiv.11 for ; Thu, 18 Dec 2014 01:42:02 -0800 (PST) X-Received: by 10.194.88.131 with SMTP id bg3mr2231292wjb.99.1418895722525; Thu, 18 Dec 2014 01:42:02 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id w10sm8256264wje.10.2014.12.18.01.42.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Dec 2014 01:42:01 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Chris Ball Cc: Srinivas Kandagatla , Maxime Coquelin , Patrice Chotard Subject: [PATCH 5/6] mmc: sdhci-st: Do cleanup while mmc_of_parse() return an error Date: Thu, 18 Dec 2014 10:41:43 +0100 Message-Id: <1418895704-25908-6-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418895704-25908-1-git-send-email-ulf.hansson@linaro.org> References: <1418895704-25908-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , At errors, balance sdhci_pltfm_init() with sdhci_pltfm_free(), to make sure all data is freed properly. Cc: Srinivas Kandagatla Cc: Maxime Coquelin Cc: Patrice Chotard Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci-st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c index 328f348..882b07e 100644 --- a/drivers/mmc/host/sdhci-st.c +++ b/drivers/mmc/host/sdhci-st.c @@ -78,10 +78,9 @@ static int sdhci_st_probe(struct platform_device *pdev) } ret = mmc_of_parse(host->mmc); - if (ret) { dev_err(&pdev->dev, "Failed mmc_of_parse\n"); - return ret; + goto err_of; } clk_prepare_enable(clk); @@ -108,6 +107,7 @@ static int sdhci_st_probe(struct platform_device *pdev) err_out: clk_disable_unprepare(clk); +err_of: sdhci_pltfm_free(pdev); return ret;