Skip to contentSkip to conversation

phy: tegra: xusb: remove a stray unlock

PATCH Applied Dan Carpenter 3 participants 4 messages Apr 23, 2025 – May 14, 2025

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

PATCH 1/1 phy: tegra: xusb: remove a stray unlock

We used to take a lock in tegra186_utmi_bias_pad_power_on() but now we have moved the lock into the caller. Unfortunately, when we moved the lock this unlock was left behind and it results in a double unlock. Delete it now.

Fixes b47158fb4295 ("phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking")
---
 drivers/phy/tegra/xusb-tegra186.c | 2 --
 1 file changed, 2 deletions(-)
drivers/phy/tegra/xusb-tegra186.c +0 -2
index cc7b8a6a999f..23a23f2d64e5 100644
@@ -656,8 +656,6 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl)
 	} else {
 		clk_disable_unprepare(priv->usb2_trk_clk);
 	}
-
-	mutex_unlock(&padctl->lock);
 }
 
 static void tegra186_utmi_bias_pad_power_off(struct tegra_xusb_padctl *padctl)
Signature · 1 line
2.47.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Dan Carpenter

We used to take a lock in tegra186_utmi_bias_pad_power_on() but now we have moved the lock into the caller. Unfortunately, when we moved the lock this unlock was left behind and it results in a double unlock. Delete it now.

Fixes b47158fb4295 ("phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking")
---
  drivers/phy/tegra/xusb-tegra186.c | 2 --
  1 file changed, 2 deletions(-)
drivers/phy/tegra/xusb-tegra186.c +0 -0
index cc7b8a6a999f..23a23f2d64e5 100644

drivers/phy/tegra/xusb-tegra186.c static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl) · line 661

Quoted 8 lines
drivers/phy/tegra/xusb-tegra186.c +0 -2
@@ -656,8 +656,6 @@ static void tegra186_utmi_bias_pad_power_on(struct tegra_xusb_padctl *padctl)
  	} else {
  		clk_disable_unprepare(priv->usb2_trk_clk);
  	}
-
-	mutex_unlock(&padctl->lock);
  }
 
  static void tegra186_utmi_bias_pad_power_off(struct tegra_xusb_padctl *padctl)

Thanks for catching and fixing this!

Jon

Signature · 1 line
nvpublic
maintainer
#2 lore raw

Hi Vinod,

Quoted 30 lines · Jon Hunter
Quoted 16 lines · Dan Carpenter

We used to take a lock in tegra186_utmi_bias_pad_power_on() but now we have moved the lock into the caller.  Unfortunately, when we moved the lock this unlock was left behind and it results in a double unlock. Delete it now.

Fixes b47158fb4295 ("phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking")

---
  drivers/phy/tegra/xusb-tegra186.c | 2 --

  1 file changed, 2 deletions(-)
drivers/phy/tegra/xusb-tegra186.c +0 -0
index cc7b8a6a999f..23a23f2d64e5 100644

drivers/phy/tegra/xusb-tegra186.c static void tegra186_utmi_bias_pad_power_on(struct · line 661

Quoted 8 lines
drivers/phy/tegra/xusb-tegra186.c +0 -2
@@ -656,8 +656,6 @@ static void tegra186_utmi_bias_pad_power_on(struct 
 tegra_xusb_padctl *padctl)
       } else {
           clk_disable_unprepare(priv->usb2_trk_clk);
       }
-
-    mutex_unlock(&padctl->lock);
   }
   static void tegra186_utmi_bias_pad_power_off(struct tegra_xusb_padctl *padctl)
Quoted 1 line

Thanks for catching and fixing this!

Can you pick this up please?

Thanks
Jon

Signature · 1 line
nvpublic
maintainer Applied
#3 lore raw
In reply to Dan Carpenter
Quoted 6 lines · Dan Carpenter

We used to take a lock in tegra186_utmi_bias_pad_power_on() but now we have moved the lock into the caller. Unfortunately, when we moved the lock this unlock was left behind and it results in a double unlock. Delete it now.

Applied, thanks!

[1/1] phy: tegra: xusb: remove a stray unlock

      commit: 83c178470e0bf690d34c8c08440f2421b82e881c

Best regards,

Signature · 1 line
~Vinod