Commit ad408a15 authored by Guenter Roeck's avatar Guenter Roeck Committed by Felipe Balbi

Revert "usb: dwc2: host: Setting qtd to NULL after freeing it"

This reverts commit b0d65902.

The reverted commit does nothing but adding two unnecessary lines
of code.  It sets a local variable to NULL in two functions, but
that variable is not used anywhere in the rest of those functions.
This is just confusing, so let's remove it.

Cc: Vardan Mikayelyan <mvardan@synopsys.com>
Cc: John Youn <johnyoun@synopsys.com>
Cc: Douglas Anderson <dianders@chromiun.org>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent d78cc1a4
...@@ -4685,7 +4685,6 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, ...@@ -4685,7 +4685,6 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
spin_unlock_irqrestore(&hsotg->lock, flags); spin_unlock_irqrestore(&hsotg->lock, flags);
urb->hcpriv = NULL; urb->hcpriv = NULL;
kfree(qtd); kfree(qtd);
qtd = NULL;
fail1: fail1:
if (qh_allocated) { if (qh_allocated) {
struct dwc2_qtd *qtd2, *qtd2_tmp; struct dwc2_qtd *qtd2, *qtd2_tmp;
......
...@@ -582,7 +582,6 @@ static inline void dwc2_hcd_qtd_unlink_and_free(struct dwc2_hsotg *hsotg, ...@@ -582,7 +582,6 @@ static inline void dwc2_hcd_qtd_unlink_and_free(struct dwc2_hsotg *hsotg,
{ {
list_del(&qtd->qtd_list_entry); list_del(&qtd->qtd_list_entry);
kfree(qtd); kfree(qtd);
qtd = NULL;
} }
/* Descriptor DMA support functions */ /* Descriptor DMA support functions */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment