]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 18 Apr 2016 09:35:18 +0000 (12:35 +0300)
commit7147835d6de30c92b08947e4149eca40dba0a669
tree901dbc6c719c44f3da148c34cf2220866659fcc6
parent0e5be9ea28903b54fbf7b4d61802d3c25e029943
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.

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>
drivers/usb/dwc3/debugfs.c