From patchwork Fri May 29 21:06:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Anholt X-Patchwork-Id: 6511431 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B2CF2C0020 for ; Fri, 29 May 2015 21:06:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D620020806 for ; Fri, 29 May 2015 21:06:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D975320804 for ; Fri, 29 May 2015 21:06:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756860AbbE2VGN (ORCPT ); Fri, 29 May 2015 17:06:13 -0400 Received: from gabe.freedesktop.org ([131.252.210.177]:58104 "EHLO gabe.freedesktop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756266AbbE2VGN (ORCPT ); Fri, 29 May 2015 17:06:13 -0400 Received: from annarchy.freedesktop.org (annarchy.freedesktop.org [131.252.210.176]) by gabe.freedesktop.org (Postfix) with ESMTP id C6B906E422; Fri, 29 May 2015 14:06:12 -0700 (PDT) Received: from eliezer.anholt.net (annarchy.freedesktop.org [127.0.0.1]) by annarchy.freedesktop.org (Postfix) with ESMTP id BC9D318201; Fri, 29 May 2015 14:06:12 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id 49D77F0152E; Fri, 29 May 2015 14:06:12 -0700 (PDT) From: Eric Anholt To: linux-arm-kernel@lists.infradead.org Cc: linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stephen Warren , Lee Jones , Ulf Hansson , linux-mmc@vger.kernel.org, Eric Anholt Subject: [PATCH v2 1/2] mmc: sdhci-bcm2835: Clean up platform allocations if sdhci init fails. Date: Fri, 29 May 2015 14:06:11 -0700 Message-Id: <1432933572-8695-1-git-send-email-eric@anholt.net> X-Mailer: git-send-email 2.1.4 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Signed-off-by: Eric Anholt --- drivers/mmc/host/sdhci-bcm2835.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm2835.c b/drivers/mmc/host/sdhci-bcm2835.c index 0ef0343..32f4046 100644 --- a/drivers/mmc/host/sdhci-bcm2835.c +++ b/drivers/mmc/host/sdhci-bcm2835.c @@ -173,8 +173,11 @@ static int bcm2835_sdhci_probe(struct platform_device *pdev) goto err; } - return sdhci_add_host(host); + ret = sdhci_add_host(host); + if (ret) + goto err; + return 0; err: sdhci_pltfm_free(pdev); return ret;