Message ID | 20180416122930.15697-16-felipe.balbi@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index eefb748c2cb9..4c2bc9d1678e 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1525,8 +1525,7 @@ static int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) return ret; err_giveback: - if (urb_priv) - xhci_urb_free_priv(urb_priv); + xhci_urb_free_priv(urb_priv); usb_hcd_unlink_urb_from_ep(hcd, urb); spin_unlock_irqrestore(&xhci->lock, flags); usb_hcd_giveback_urb(hcd, urb, -ESHUTDOWN);
xhci_urb_free_priv() is a simple wrapper around kfree() and kfree() is safe against NULL pointers. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)