From patchwork Mon May 13 21:18:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Baatz X-Patchwork-Id: 2560671 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B4D063FD4E for ; Mon, 13 May 2013 21:19:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754047Ab3EMVTp (ORCPT ); Mon, 13 May 2013 17:19:45 -0400 Received: from mo-p00-ob.rzone.de ([81.169.146.162]:38396 "EHLO mo-p00-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752912Ab3EMVTo (ORCPT ); Mon, 13 May 2013 17:19:44 -0400 X-RZG-AUTH: :L20Qdkipd/NtQfa28f3iP6nsj1VEm6lxnnjU56eNUnjyVKhsoRrRYQqTg2VsKWBjXOD8qSDlEoJr1es= X-RZG-CLASS-ID: mo00 Received: from gandalf.schnuecks.de ([2001:4dd0:f8d2:2602::1]) by smtp.strato.de (jorabe mo25) (RZmta 31.27 AUTH) with (DHE-RSA-AES256-SHA encrypted) ESMTPA id 20084ep4DK0wR5 ; Mon, 13 May 2013 23:19:43 +0200 (CEST) Received: by gandalf.schnuecks.de (Postfix, from userid 500) id 0BD594014B; Mon, 13 May 2013 23:19:42 +0200 (CEST) From: Simon Baatz To: linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Cc: Jason Cooper , Andrew Lunn , Chris Ball , Guennadi Liakhovetski , Thomas Petazzoni Subject: [PATCH V2 02/10] mmc: sh_mmcif: handle mmc_of_parse() errors during probe Date: Mon, 13 May 2013 23:18:53 +0200 Message-Id: <1368479941-10084-3-git-send-email-gmbnomis@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1368479941-10084-1-git-send-email-gmbnomis@gmail.com> References: <1368479941-10084-1-git-send-email-gmbnomis@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Signed-off-by: Simon Baatz --- drivers/mmc/host/sh_mmcif.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index ba76a53..6ded7fb 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1369,7 +1369,11 @@ static int sh_mmcif_probe(struct platform_device *pdev) ret = -ENOMEM; goto ealloch; } - mmc_of_parse(mmc); + + ret = mmc_of_parse(mmc); + if (ret < 0) + goto eofparse; + host = mmc_priv(mmc); host->mmc = mmc; host->addr = reg; @@ -1464,6 +1468,7 @@ eclkupdate: clk_put(host->hclk); eclkget: pm_runtime_disable(&pdev->dev); +eofparse: mmc_free_host(mmc); ealloch: iounmap(reg);