Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758061AbcDHJwu (ORCPT ); Fri, 8 Apr 2016 05:52:50 -0400 Received: from mga11.intel.com ([192.55.52.93]:49354 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753459AbcDHJwt (ORCPT ); Fri, 8 Apr 2016 05:52:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,449,1455004800"; d="scan'208";a="682916710" From: changbin.du@intel.com To: balbi@kernel.org Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, "Du, Changbin" Subject: [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit Date: Fri, 8 Apr 2016 17:42:02 +0800 Message-Id: <1460108522-31664-1-git-send-email-changbin.du@intel.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 767 Lines: 29 From: "Du, Changbin" dwc->regset is allocated on dwc3_debugfs_init, and should be released on dwc3_debugfs_exit. Signed-off-by: Du, Changbin --- This patch is seperated from patch set: [PATCH v2 0/3] Improvement, fix and new entry for dwc3 debugfs Because it is not related to other 2 patches. --- drivers/usb/dwc3/debugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c index 9ac37fe..9eeb444 100644 --- a/drivers/usb/dwc3/debugfs.c +++ b/drivers/usb/dwc3/debugfs.c @@ -687,4 +687,7 @@ void dwc3_debugfs_exit(struct dwc3 *dwc) { debugfs_remove_recursive(dwc->root); dwc->root = NULL; + + kfree(dwc->regset); + dwc->regset = NULL; } -- 2.5.0