Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755945AbcDGLn5 (ORCPT ); Thu, 7 Apr 2016 07:43:57 -0400 Received: from mga09.intel.com ([134.134.136.24]:6337 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755418AbcDGLnz (ORCPT ); Thu, 7 Apr 2016 07:43:55 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,449,1455004800"; d="scan'208";a="940264503" Message-ID: <57064981.2030004@linux.intel.com> Date: Thu, 07 Apr 2016 14:50:25 +0300 From: Mathias Nyman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Thierry Reding CC: Greg Kroah-Hartman , Mathias Nyman , Stephen Warren , Alexandre Courbot , Andrew Bresticker , linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v10 8/9] usb: xhci: Add NVIDIA Tegra XUSB controller driver References: <1457108379-20794-1-git-send-email-thierry.reding@gmail.com> <1457108379-20794-8-git-send-email-thierry.reding@gmail.com> <57063E91.1070202@linux.intel.com> <20160407110501.GA10231@ulmo.ba.sec> In-Reply-To: <20160407110501.GA10231@ulmo.ba.sec> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1910 Lines: 55 On 07.04.2016 14:05, Thierry Reding wrote: > On Thu, Apr 07, 2016 at 02:03:45PM +0300, Mathias Nyman wrote: >> On 04.03.2016 18:19, Thierry Reding wrote: >>> From: Thierry Reding >>> >>> Add support for the on-chip XUSB controller present on Tegra SoCs. This >>> controller, when loaded with external firmware, exposes an interface >>> compliant with xHCI. This driver loads the firmware, starts the >>> controller, and is able to service host-specific messages sent by the >>> controller's firmware. >>> >>> The controller also supports USB device mode as well as powergating >>> of the SuperSpeed and host-controller logic when not in use, but >>> support for these is not yet implemented. >>> >>> Based on work by: >>> Ajay Gupta >>> Bharath Yadav >>> Andrew Bresticker >>> >>> Cc: Greg Kroah-Hartman >>> Cc: Mathias Nyman >>> Signed-off-by: Thierry Reding >>> --- >> >> ... >> >>> +static int tegra_xusb_remove(struct platform_device *pdev) >>> +{ >>> + struct tegra_xusb *tegra = platform_get_drvdata(pdev); >> > + struct usb_hcd *hcd = tegra->hcd; >>> + struct xhci_hcd *xhci; >>> + >>> + if (tegra->fw_loaded) { >>> + xhci = hcd_to_xhci(hcd); >>> + usb_remove_hcd(xhci->shared_hcd); >>> + usb_put_hcd(xhci->shared_hcd); >>> + usb_remove_hcd(hcd); >>> + tegra_xusb_padctl_put(tegra->padctl); >>> + usb_put_hcd(hcd); >>> + kfree(xhci); >> >> Don't free xhci here, xhci is a part of hcd (hcd_priv) and hcd is already freed in usb_put_hcd() > > Ah, this was indeed reported to me about two weeks ago and fixed since > then in my local tree. > >> Other than that I can't see any issues > > Thanks. Does this count as an Acked-by provided the kfree() is removed? > yes, Acked-by: Mathias Nyman