mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-08 17:49:45 +00:00
usb: gadget: udc: Potential Oops in error handling code
[ Upstream commite55f3c37cb
] If this is in "transceiver" mode the the ->qwork isn't required and is a NULL pointer. This can lead to a NULL dereference when we call destroy_workqueue(udc->qwork). Fixes:3517c31a8e
("usb: gadget: mv_udc: use devm_xxx for probe") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f5e4ce482e
commit
5034b1fdb0
1 changed files with 2 additions and 1 deletions
|
@ -2313,7 +2313,8 @@ static int mv_udc_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
err_create_workqueue:
|
||||
destroy_workqueue(udc->qwork);
|
||||
if (udc->qwork)
|
||||
destroy_workqueue(udc->qwork);
|
||||
err_destroy_dma:
|
||||
dma_pool_destroy(udc->dtd_pool);
|
||||
err_free_dma:
|
||||
|
|
Loading…
Reference in a new issue