usb: gadget: fusb300_udc: free irq on the error path in fusb300_probe()
authorGaosheng Cui <cuigaosheng1@huawei.com>
Wed, 23 Nov 2022 01:41:21 +0000 (09:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:29 +0000 (09:33 +0100)
commit061609b555d4fed43363c6b9c5e49220d3c0235c
treee3070fcc86804714e9fee958342aab3e9a31582e
parent4f3dea31bfa167c409e27a3f62b2951e8f77c4c4
usb: gadget: fusb300_udc: free irq on the error path in fusb300_probe()

[ Upstream commit a8d3392e0e5cfeb03f0cea1f2bc3f5f183c1deb4 ]

When request_irq(ires1->start) failed in w5300_hw_probe(), irq
ires->start has not been freed, and on the clean_up3 error path,
we also need to free ires1->start irq, fix it.

In addition, We should add free_irq in fusb300_remove(), and give
the lables a proper name so that they can be understood easily,
so add free_irq in fusb300_remove(), and update clean_up3 to
err_alloc_request.

Fixes: 0fe6f1d1f612 ("usb: udc: add Faraday fusb300 driver")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Link: https://lore.kernel.org/r/20221123014121.1989721-1-cuigaosheng1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/gadget/udc/fusb300_udc.c