Staging: dwc2: remove a kfree(NULL)
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 15 Mar 2013 06:03:31 +0000 (09:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 16:05:36 +0000 (09:05 -0700)
dwc2_hcd_release() calls dwc2_hcd_free() which frees ->core_params
and sets it to NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dwc2/hcd.c

index 246b483481fa7e27cf6ebc3efba390831cdb77b0..01dbdd85c72519d50e22c4b51f2437c0f1775e4a 100644 (file)
@@ -2940,7 +2940,6 @@ void dwc2_hcd_remove(struct device *dev, struct dwc2_hsotg *hsotg)
        usb_remove_hcd(hcd);
        hsotg->priv = NULL;
        dwc2_hcd_release(hsotg);
-       kfree(hsotg->core_params);
 
 #ifdef CONFIG_USB_DWC2_TRACK_MISSED_SOFS
        kfree(hsotg->last_frame_num_array);