Message ID | 1418895704-25908-3-git-send-email-ulf.hansson@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDF57NG2XIHRBZ6CZKSAKGQEUHZSPLY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AF94726C6B for <linaro@patches.linaro.org>; Thu, 18 Dec 2014 09:42:00 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id y19sf489265wgg.7 for <linaro@patches.linaro.org>; Thu, 18 Dec 2014 01:42:00 -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=uMMPxkG5o/NYXbFM26CtgMJX29BjjPBalqrwB5zUkes=; b=QlurxBJ4XcdScLUq1aHQ9GtXXUNEZu4NI+3ADbsWogNCDn9dq5cGHyOIadKAQlmD9j 6InziFnqmi14ItB5YyvS20qZbf3GXl36jKDBSvMi7z1aQUHYEgHy+4prK+4EEZS6f+VA zgJkfzEW+jsOgx63+FIPK3PIPUhQBel5+75u5Z58Twi8AUUtTJZD+NWCfTKukjw72Meu Mou9TrpZoPHFMKCqRMIWYMwHb2m4ABg4vZYWGz/JYKA+hTdYIcA3KjA3RHV8woMwmfUB gtkUrug5gggIjZQJe9JdGhivZLeP/5Lqup85Dt0Fst7ROVUECCoyhcEndIN+wyX+Z/SJ i85w== X-Gm-Message-State: ALoCoQmn51wRDoFG2+5stgpHlkug6jLekq5C/jKrPUPK3hyrttTZSukjGNF2af7Z1LkXP7godO7n X-Received: by 10.180.89.211 with SMTP id bq19mr1999209wib.4.1418895720026; Thu, 18 Dec 2014 01:42:00 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.74 with SMTP id q10ls1165093laq.43.gmail; Thu, 18 Dec 2014 01:41:59 -0800 (PST) X-Received: by 10.112.85.11 with SMTP id d11mr1228716lbz.100.1418895719706; Thu, 18 Dec 2014 01:41:59 -0800 (PST) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id ev4si6262965lbc.105.2014.12.18.01.41.59 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Dec 2014 01:41:59 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id u10so663693lbd.3 for <patchwork-forward@linaro.org>; Thu, 18 Dec 2014 01:41:59 -0800 (PST) X-Received: by 10.152.197.5 with SMTP id iq5mr1289889lac.6.1418895719291; Thu, 18 Dec 2014 01:41:59 -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 ru5csp1645872lbb; Thu, 18 Dec 2014 01:41:58 -0800 (PST) X-Received: by 10.180.208.112 with SMTP id md16mr3233743wic.37.1418895718501; Thu, 18 Dec 2014 01:41:58 -0800 (PST) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com. [209.85.212.179]) by mx.google.com with ESMTPS id bo4si22218623wib.80.2014.12.18.01.41.58 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Dec 2014 01:41:58 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.212.179 as permitted sender) client-ip=209.85.212.179; Received: by mail-wi0-f179.google.com with SMTP id ex7so1143929wid.0 for <patches@linaro.org>; Thu, 18 Dec 2014 01:41:58 -0800 (PST) X-Received: by 10.194.110.69 with SMTP id hy5mr2306421wjb.121.1418895718216; Thu, 18 Dec 2014 01:41:58 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id w10sm8256264wje.10.2014.12.18.01.41.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Dec 2014 01:41:57 -0800 (PST) From: Ulf Hansson <ulf.hansson@linaro.org> To: linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>, Chris Ball <chris@printf.net> Cc: Christian Daudt <bcm@fixthebug.org>, Matt Porter <mporter@linaro.org>, Florian Fainelli <f.fainelli@gmail.com> Subject: [PATCH 2/6] mmc: sdhci-bcm-kona: Handle error from mmc_of_parse() Date: Thu, 18 Dec 2014 10:41:40 +0100 Message-Id: <1418895704-25908-3-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.172 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: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index e7e4fbd..34bb8f9 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -254,7 +254,9 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev) kona_dev = sdhci_pltfm_priv(pltfm_priv); mutex_init(&kona_dev->write_lock); - mmc_of_parse(host->mmc); + ret = mmc_of_parse(host->mmc); + if (ret) + goto err_pltfm_free; if (!host->mmc->f_max) { dev_err(&pdev->dev, "Missing max-freq for SDHCI cfg\n");
Since mmc_of_parse() may fail, let's deal with it and thus do proper error handling. Cc: Christian Daudt <bcm@fixthebug.org> Cc: Matt Porter <mporter@linaro.org> Cc: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/mmc/host/sdhci-bcm-kona.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)