usb: dwc3: pci: Properly cleanup resource
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Mon, 19 Mar 2018 20:07:35 +0000 (13:07 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 22 Mar 2018 08:48:18 +0000 (10:48 +0200)
commitcabdf83dadfb3d83eec31e0f0638a92dbd716435
treef944b82504a3b89b717e14327fce41a84f92ef77
parentde948a74ad6f0eefddf36d765b8f2dd6df82caa0
usb: dwc3: pci: Properly cleanup resource

Platform device is allocated before adding resources. Make sure to
properly cleanup on error case.

Cc: <stable@vger.kernel.org>
Fixes: f1c7e7108109 ("usb: dwc3: convert to pcim_enable_device()")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/dwc3-pci.c