Skip to contentSkip to conversation

USB: ohci-sm501: Add missed iounmap() in remove

PATCH In review Chuhong Yuan 2 participants 2 messages Jun 10, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 USB: ohci-sm501: Add missed iounmap() in remove

This driver misses calling iounmap() in remove to undo the ioremap() called in probe.
Add the missed call to fix it.

Fixes f54aab6ebcec ("usb: ohci-sm501 driver")
---
 drivers/usb/host/ohci-sm501.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ohci-sm501.c +1 -0
index cff965240327..b91d50da6127 100644
@@ -191,6 +191,7 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev)
 	struct resource	*mem;
 
 	usb_remove_hcd(hcd);
+	iounmap(hcd->regs);
 	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
 	usb_put_hcd(hcd);
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
Signature · 1 line
2.26.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 24 lines · Chuhong Yuan

This driver misses calling iounmap() in remove to undo the ioremap() called in probe.
Add the missed call to fix it.

Fixes f54aab6ebcec ("usb: ohci-sm501 driver")
---
 drivers/usb/host/ohci-sm501.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ohci-sm501.c +1 -0
index cff965240327..b91d50da6127 100644
@@ -191,6 +191,7 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev)
 	struct resource	*mem;
 
 	usb_remove_hcd(hcd);
+	iounmap(hcd->regs);
 	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
 	usb_put_hcd(hcd);
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
Signature · 1 line
2.26.2