Skip to content

Commit bc23283

Browse files
jirislabydavem330
authored andcommitted
NET: phy_device, fix lock imbalance
Don't forget to unlock a mutex in phy_scan_fixups on a fail path. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ee686ca commit bc23283

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/phy/phy_device.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ int phy_scan_fixups(struct phy_device *phydev)
134134

135135
err = fixup->run(phydev);
136136

137-
if (err < 0)
137+
if (err < 0) {
138+
mutex_unlock(&phy_fixup_lock);
138139
return err;
140+
}
139141
}
140142
}
141143
mutex_unlock(&phy_fixup_lock);

0 commit comments

Comments
 (0)