From patchwork Thu Mar 24 16:35:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Koskinen, Aaro (Nokia - FI/Espoo)" X-Patchwork-Id: 659181 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2OGcu5C012155 for ; Thu, 24 Mar 2011 16:38:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752395Ab1CXQiy (ORCPT ); Thu, 24 Mar 2011 12:38:54 -0400 Received: from smtp.nokia.com ([147.243.128.26]:29118 "EHLO mgw-da02.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752187Ab1CXQiw (ORCPT ); Thu, 24 Mar 2011 12:38:52 -0400 Received: from nokia.com (localhost [127.0.0.1]) by mgw-da02.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id p2OGclDT007546; Thu, 24 Mar 2011 18:38:47 +0200 Received: from localhost.localdomain ([helruo-dhcp02150.ntc.nokia.com [172.21.21.50]]) by mgw-da02.nokia.com with RELAY id p2OGc6Ql006960 ; Thu, 24 Mar 2011 18:38:28 +0200 From: Aaro Koskinen To: tony@atomide.com, khilman@ti.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Aaro Koskinen Subject: [PATCH 6/6] arm: mach-omap2: smartreflex: delete debugfs entries on probe error Date: Thu, 24 Mar 2011 18:35:35 +0200 Message-Id: <1300984535-10530-6-git-send-email-aaro.koskinen@nokia.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1300984535-10530-1-git-send-email-aaro.koskinen@nokia.com> References: <1300984535-10530-1-git-send-email-aaro.koskinen@nokia.com> X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Mar 2011 16:38:56 +0000 (UTC) diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index c8cd1ef..85d8167 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c @@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) dev_err(&pdev->dev, "%s: Unable to create debugfs directory" "for n-values\n", __func__); ret = PTR_ERR(nvalue_dir); - goto err_iounmap; + goto err_debugfs; } omap_voltage_get_volttable(sr_info->voltdm, &volt_data); @@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) "entries for n-values\n", __func__, sr_info->voltdm->name); ret = -ENODATA; - goto err_iounmap; + goto err_debugfs; } for (i = 0; i < sr_info->nvalue_count; i++) { @@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev) return ret; +err_debugfs: + debugfs_remove_recursive(sr_info->dbg_dir); err_iounmap: list_del(&sr_info->node); iounmap(sr_info->base);