[U-Boot] [PATCH 1/1] usb: xhci-ring: remove superfluous assignment
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Mar 18 13:01:01 UTC 2018
No need to set a variable to NULL if the next use is an assignment.
Do not define variables in the middle of nowhere.
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
drivers/usb/host/xhci-ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 7599c9183a..76580a1905 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -762,6 +762,7 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
struct xhci_virt_device *virt_dev = ctrl->devs[slot_id];
struct xhci_ring *ep_ring;
union xhci_trb *event;
+ struct xhci_ep_ctx *ep_ctx;
debug("req=%u (%#x), type=%u (%#x), value=%u (%#x), index=%u\n",
req->request, req->request,
@@ -786,7 +787,6 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
xhci_inval_cache((uintptr_t)virt_dev->out_ctx->bytes,
virt_dev->out_ctx->size);
- struct xhci_ep_ctx *ep_ctx = NULL;
ep_ctx = xhci_get_ep_ctx(ctrl, virt_dev->out_ctx, ep_index);
/* 1 TRB for setup, 1 for status */
--
2.16.2
More information about the U-Boot
mailing list