From patchwork Thu Mar 25 11:25:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 88190 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2PBQOAm031988 for ; Thu, 25 Mar 2010 11:26:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754447Ab0CYL0U (ORCPT ); Thu, 25 Mar 2010 07:26:20 -0400 Received: from smtp.nokia.com ([192.100.122.230]:48731 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754399Ab0CYL0T (ORCPT ); Thu, 25 Mar 2010 07:26:19 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o2PBQETm011437; Thu, 25 Mar 2010 13:26:15 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 25 Mar 2010 13:26:09 +0200 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 25 Mar 2010 13:26:08 +0200 Received: from localhost.localdomain (esdhcp04088.research.nokia.com [172.21.40.88]) by mgw-da02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o2PBQ2DW032640; Thu, 25 Mar 2010 13:26:04 +0200 From: Felipe Balbi To: Greg KH Cc: Linux USB Mailing List , Linux OMAP Mailing List , Felipe Balbi Subject: [patch-2.6.35 (v2) 01/11] usb: musb: debugfs: musb_exit_debugfs() can be called on probe Date: Thu, 25 Mar 2010 13:25:18 +0200 Message-Id: <1269516328-28267-2-git-send-email-felipe.balbi@nokia.com> X-Mailer: git-send-email 1.7.0.rc0.33.g7c3932 In-Reply-To: <1269516328-28267-1-git-send-email-felipe.balbi@nokia.com> References: <1269516328-28267-1-git-send-email-felipe.balbi@nokia.com> X-OriginalArrivalTime: 25 Mar 2010 11:26:09.0283 (UTC) FILETIME=[F7854D30:01CACC0D] 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.3 (demeter.kernel.org [140.211.167.41]); Thu, 25 Mar 2010 11:26:24 +0000 (UTC) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 80bc72c..e2f8bcf 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2057,12 +2057,12 @@ bad_config: status = musb_init_debugfs(musb); if (status < 0) - goto fail2; + goto fail4; #ifdef CONFIG_SYSFS status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group); if (status) - goto fail4; + goto fail5; #endif dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n", @@ -2079,6 +2079,9 @@ bad_config: return 0; +fail5: + musb_exit_debugfs(musb); + fail4: if (!is_otg_enabled(musb) && is_host_enabled(musb)) usb_remove_hcd(musb_to_hcd(musb)); diff --git a/drivers/usb/musb/musb_debugfs.c b/drivers/usb/musb/musb_debugfs.c index b6a27ba..7768634 100644 --- a/drivers/usb/musb/musb_debugfs.c +++ b/drivers/usb/musb/musb_debugfs.c @@ -289,7 +289,7 @@ err0: return ret; } -void __exit musb_exit_debugfs(struct musb *musb) +void /* __init_or_exit */ musb_exit_debugfs(struct musb *musb) { debugfs_remove_recursive(musb_debugfs_root); }