Skip to contentSkip to conversation

ARM: OMAP2: Add missing iounmap in omap4430_phy_init

PATCH In review Todd Poynor 2 participants 2 messages May 26, 2011 – May 31, 2011

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

PATCH 1/1 ARM: OMAP2: Add missing iounmap in omap4430_phy_init

!dev case needs iounmap before return.

---
 arch/arm/mach-omap2/omap_phy_internal.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/omap_phy_internal.c +3 -1
index ae97336..bd563cf 100644
@@ -56,8 +56,10 @@ int omap4430_phy_init(struct device *dev)
 	/* Power down the phy */
 	__raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
 
-	if (!dev)
+	if (!dev) {
+		iounmap(ctrl_base);
 		return 0;
+	}
 
 	phyclk = clk_get(dev, "ocp2scp_usb_phy_ick");
 	if (IS_ERR(phyclk)) {
Signature · 1 line
1.7.3.1
maintainer
#1 lore raw
Quoted 1 line · Todd Poynor

!dev case needs iounmap before return.

Adding to fixes thanks.

Tony

Quoted 24 lines
---
 arch/arm/mach-omap2/omap_phy_internal.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/omap_phy_internal.c +3 -1
index ae97336..bd563cf 100644
@@ -56,8 +56,10 @@ int omap4430_phy_init(struct device *dev)
 	/* Power down the phy */
 	__raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
 
-	if (!dev)
+	if (!dev) {
+		iounmap(ctrl_base);
 		return 0;
+	}
 
 	phyclk = clk_get(dev, "ocp2scp_usb_phy_ick");
 	if (IS_ERR(phyclk)) {
Signature · 1 line
1.7.3.1