Skip to content

Commit 78e9158

Browse files
author
Peter Chen
committed
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: 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>
1 parent afaa2e7 commit 78e9158

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/cdns3/gadget.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ static int cdns3_ep_run_transfer(struct cdns3_endpoint *priv_ep,
11141114
struct cdns3_device *priv_dev = priv_ep->cdns3_dev;
11151115
struct cdns3_request *priv_req;
11161116
struct cdns3_trb *trb;
1117-
struct cdns3_trb *link_trb;
1117+
struct cdns3_trb *link_trb = NULL;
11181118
dma_addr_t trb_dma;
11191119
u32 togle_pcs = 1;
11201120
int sg_iter = 0;

0 commit comments

Comments
 (0)