[v2,for-4.9,16/32] usb: dwc2: Remove unnecessary kfree

Message ID 1491388344-13521-17-git-send-email-amit.pundir@linaro.org
State New
Headers show
Series
  • Stable commits picked up from lede project
Related show

Commit Message

Amit Pundir April 5, 2017, 10:32 a.m.
From: John Youn <johnyoun@synopsys.com>


This shouldn't be freed by the HCD as it is owned by the core and
allocated with devm_kzalloc.

Signed-off-by: John Youn <johnyoun@synopsys.com>

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>

(cherry picked from commit cd4b1e34655d46950c065d9284b596cd8d7b28cd)
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

---
 drivers/usb/dwc2/hcd.c | 1 -
 1 file changed, 1 deletion(-)

-- 
2.7.4

Patch

diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index df5a065..1b6f5e1 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -5184,7 +5184,6 @@  int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
 error2:
 	usb_put_hcd(hcd);
 error1:
-	kfree(hsotg->core_params);
 
 #ifdef CONFIG_USB_DWC2_TRACK_MISSED_SOFS
 	kfree(hsotg->last_frame_num_array);