From patchwork Thu Oct 10 07:42:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 3014651 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2E5BD9F245 for ; Thu, 10 Oct 2013 07:42:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35693203AE for ; Thu, 10 Oct 2013 07:42:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 163A1203AF for ; Thu, 10 Oct 2013 07:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754510Ab3JJHmZ (ORCPT ); Thu, 10 Oct 2013 03:42:25 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:33238 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754491Ab3JJHmY (ORCPT ); Thu, 10 Oct 2013 03:42:24 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MUG002VR01HHBX0@mailout3.samsung.com>; Thu, 10 Oct 2013 16:42:22 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.51]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id B9.93.20109.E5A56525; Thu, 10 Oct 2013 16:42:22 +0900 (KST) X-AuditID: cbfee68f-b7f1e6d000004e8d-73-52565a5ebe38 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 31.F1.09055.E5A56525; Thu, 10 Oct 2013 16:42:22 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MUG00CTA02MGEC0@mmp1.samsung.com>; Thu, 10 Oct 2013 16:42:22 +0900 (KST) From: Jingoo Han To: 'Greg Kroah-Hartman' Cc: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org, 'Kukjin Kim' , 'Alan Stern' , 'Sylwester Nawrocki' , 'Tomasz Figa' , 'Sachin Kamat' , 'Jingoo Han' References: <000101cec58b$ee8bd2f0$cba378d0$%han@samsung.com> In-reply-to: <000101cec58b$ee8bd2f0$cba378d0$%han@samsung.com> Subject: [PATCH V2 4/5] USB: ohci-exynos: Add missing usb_put_hcd() Date: Thu, 10 Oct 2013 16:42:22 +0900 Message-id: <000501cec58c$41590750$c40b15f0$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac7Fi+5bS2rX9cS6SFqxMcDwCOMqpwAAERGw Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLIsWRmVeSWpSXmKPExsVy+t8zY924qLAgg49/ZS2aF69ns7i88BKr Re+Cq2wWM87vY7JYtKyV2eLwm3ZWi5N/ehktJvy+wGaxfsZrFgdOjzvX9rB57J+7ht1j9t0f jB59W1YxenzeJBfAGsVlk5Kak1mWWqRvl8CVcfvafbaCs6wVazumszYw3mDpYuTkkBAwkZjV fIcNwhaTuHBvPZDNxSEksIxR4vOUi3BF26a3MEEkFjFKvFj9lR3C+QXktNwGa2cTUJP48uUw O4gtImAqsfH9FEaQImaB3UwSj1bcZQVJCAnYSpy6eQOsiFPATmLznFlgK4QFnCUe74EYxCKg KrFr1zkwmxeo/u31v8wQtqDEj8n3wOqZBbQk1u88zgRhy0tsXvMWqIYD6FR1i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MAB6MSD29FWWiQEGtiWXFl7iFGCQ5mJRHe6SeB QrwpiZVVqUX58UWlOanFhxiTgR6dyCwlmpwPTGd5JfGGxiZmRpZGZhZGJubmpAkrifMeaLUO FBJITyxJzU5NLUgtgtnCxMEp1cAYt9NdycdzXs6n1cevLdnxroMnaNfu42d+zXxQmjxl9TSr o1fqF5ucqrrL8uHM9lPrTqTtU7wn5XRUPD+jaNuq76p7N3x7lz31pkCysz/jjw0itg94N19l axXKfJauwLv1yVzv3ymLYuLrRKv4Z/WvWy8nqbG6edHlOSnbjX1WLF8gwPfA4mPPAyWW4oxE Qy3mouJEAK7zNERdAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 When devm_usb_get_phy() fails, usb_put_hcd() should be called to prevent memory leak. Signed-off-by: Jingoo Han --- drivers/usb/host/ohci-exynos.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 5c877bf..aa50e18 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -91,6 +91,7 @@ static int exynos_ohci_probe(struct platform_device *pdev) phy = devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2); if (IS_ERR(phy)) { + usb_put_hcd(hcd); dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); return -EPROBE_DEFER; } else {