Skip to content

Commit

Permalink
usb: cdns3: gadget: initialize link_trb as NULL
Browse files Browse the repository at this point in the history
There is an uninitialized variable "link_trb" usage at function cdns3_ep_run_transfer.
Fixed it by initialize "link_trb" as NULL.

Fixes: 4e21888 ("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>
  • Loading branch information
Peter Chen committed Nov 16, 2020
1 parent afaa2e7 commit 78e9158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/cdns3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 78e9158

Please sign in to comment.