diff options
author | Peter Chen <peter.chen@nxp.com> | 2020-11-03 19:23:27 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@nxp.com> | 2020-11-16 15:08:52 +0800 |
commit | 78e91588510919a0dc9bd48916e760c1ba5797d2 (patch) | |
tree | a4a6f706f2feb2919a708ec3677a75c7619bcce8 /drivers/usb/cdns3 | |
parent | afaa2e745a246c5ab95103a65b1ed00101e1bc63 (diff) |
usb: cdns3: gadget: initialize link_trb as NULL
There is an uninitialized variable "link_trb" usage at function cdns3_ep_run_transfer.
Fixed it by initialize "link_trb" as NULL.
Fixes: 4e218882eb5a ("usb: cdns3: gadget: improve the dump TRB operation at cdns3_ep_run_transfer")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb/cdns3')
-rw-r--r-- | drivers/usb/cdns3/gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index 66c1e6723eb1..1ee6d3941dd4 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -1114,7 +1114,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep, struct cdns3_device *priv_dev = priv_ep->cdns3_dev; struct cdns3_request *priv_req; struct cdns3_trb *trb; - struct cdns3_trb *link_trb; + struct cdns3_trb *link_trb = NULL; dma_addr_t trb_dma; u32 togle_pcs = 1; int sg_iter = 0; |