Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755008Ab1EPM2U (ORCPT ); Mon, 16 May 2011 08:28:20 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:38870 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754939Ab1EPM2S (ORCPT ); Mon, 16 May 2011 08:28:18 -0400 From: Keshava Munegowda To: , , CC: Keshava Munegowda , , , , , Subject: [PATCH v1] mfd: Fix omap_usbhs_alloc_children error handling Date: Mon, 16 May 2011 17:54:07 +0530 Message-ID: <1305548647-19849-1-git-send-email-keshava_mgowda@ti.com> X-Mailer: git-send-email 1.6.0.4 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1260 Lines: 46 From: Axel Lin rebased on top of hwmod and runtime pm patch series of usbhs Signed-off-by: Axel Lin Tested-by: Keshava Munegowda --- drivers/mfd/omap-usb-host.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index e1bc3b5..32d19e2 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -282,6 +282,7 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev) if (!ehci) { dev_err(dev, "omap_usbhs_alloc_child failed\n"); + ret = -ENOMEM; goto err_end; } @@ -305,13 +306,14 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev) sizeof(*ohci_data), dev); if (!ohci) { dev_err(dev, "omap_usbhs_alloc_child failed\n"); + ret = -ENOMEM; goto err_ehci; } return 0; err_ehci: - platform_device_put(ehci); + platform_device_unregister(ehci); err_end: return ret; -- 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/