public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit
@ 2016-04-08  9:42 changbin.du
  2016-04-11  8:06 ` Felipe Balbi
  0 siblings, 1 reply; 14+ messages in thread
From: changbin.du @ 2016-04-08  9:42 UTC (permalink / raw)
  To: balbi; +Cc: gregkh, linux-usb, linux-kernel, Du, Changbin

From: "Du, Changbin" <changbin.du@intel.com>

dwc->regset is allocated on dwc3_debugfs_init, and should
be released on dwc3_debugfs_exit.

Signed-off-by: Du, Changbin <changbin.du@intel.com>
---
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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-04-12 10:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-08  9:42 [PATCH] usb: dwc3: free dwc->regset on dwc3_debugfs_exit changbin.du
2016-04-11  8:06 ` Felipe Balbi
2016-04-11 11:09   ` Du, Changbin
2016-04-11 11:13     ` Felipe Balbi
2016-04-11 11:38       ` Du, Changbin
2016-04-11 12:09         ` Felipe Balbi
2016-04-12  2:10           ` Du, Changbin
2016-04-12  6:18             ` Felipe Balbi
2016-04-12  6:52               ` Du, Changbin
2016-04-12  8:06                 ` Felipe Balbi
2016-04-12  8:14               ` [PATCH v2] usb: dwc3: fix memory leak of dwc->regset changbin.du
2016-04-12  8:26                 ` Felipe Balbi
2016-04-12  8:24                   ` [PATCH v3] " changbin.du
2016-04-12 10:09                     ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox