Revert "usb: dwc2: host: Setting qtd to NULL after freeing it"
authorGuenter Roeck <linux@roeck-us.net>
Wed, 29 May 2019 20:54:43 +0000 (13:54 -0700)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 18 Jun 2019 08:58:29 +0000 (11:58 +0300)
This reverts commit b0d659022e5c96ee5c4bd62d22d3da2d66de306b.

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: Minas Harutyunyan <hminas@synopsys.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/hcd.c
drivers/usb/dwc2/hcd.h

index 4c78a39..ee144ff 100644 (file)
@@ -4685,7 +4685,6 @@ fail2:
        spin_unlock_irqrestore(&hsotg->lock, flags);
        urb->hcpriv = NULL;
        kfree(qtd);
-       qtd = NULL;
 fail1:
        if (qh_allocated) {
                struct dwc2_qtd *qtd2, *qtd2_tmp;
index ce6445a..8ca6d12 100644 (file)
@@ -582,7 +582,6 @@ static inline void dwc2_hcd_qtd_unlink_and_free(struct dwc2_hsotg *hsotg,
 {
        list_del(&qtd->qtd_list_entry);
        kfree(qtd);
-       qtd = NULL;
 }
 
 /* Descriptor DMA support functions */