UPSTREAM: usb: dwc3: fix memory leak of dwc->regset
authorDu, Changbin <changbin.du@intel.com>
Tue, 12 Apr 2016 08:24:34 +0000 (16:24 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
commit324860a4337d95eba3080482a7691671497e017e
tree5ad7619f9a0139c8f9adb37586ffe85cd852bb5f
parentedf933457235a997d2325e3304d6c31dadd2ff18
UPSTREAM: usb: dwc3: fix memory leak of dwc->regset

dwc->regset is allocated on dwc3_debugfs_init, and should
be released on init failure or dwc3_debugfs_exit. Btw,
The line "dwc->root = NULL" is unnecessary, so remove it.

Change-Id: I57f72554e8fc6eab95bd9103c0a44f4328613d15
Signed-off-by: Du, Changbin <changbin.du@intel.com>
[ felipe.balbi@linux.intel.com : add another err label for the new
error condition ]
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit e6bdf8195b4a43ebff71f25fc7ca5e436e79161a)
drivers/usb/dwc3/debugfs.c