mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
usb: gadget: mv_udc_core: fix phy_regs I/O memory leak
There was an omission in transition to devm_xxx resource handling.
iounmap(udc->phy_regs) were removed, but ioremap() was left
without devm_.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Fixes: 3517c31a8e
("usb: gadget: mv_udc: use devm_xxx for probe")
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
4696b8874d
commit
53e20f2eb1
@ -2167,7 +2167,7 @@ static int mv_udc_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
udc->phy_regs = ioremap(r->start, resource_size(r));
|
||||
udc->phy_regs = devm_ioremap(&pdev->dev, r->start, resource_size(r));
|
||||
if (udc->phy_regs == NULL) {
|
||||
dev_err(&pdev->dev, "failed to map phy I/O memory\n");
|
||||
return -EBUSY;
|
||||
|
Loading…
Reference in New Issue
Block a user