Skip to contentSkip to conversation

phy: miphy28lp: unlock on error in miphy28lp_init()

PATCH In review Dan Carpenter 2 participants 2 messages Dec 16, 2014 – Dec 17, 2014

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

PATCH 1/1 phy: miphy28lp: unlock on error in miphy28lp_init()

We need to unlock before returning the -EINVAL here.

drivers/phy/phy-miphy28lp.c +2 -1
index e34da13..27fa62c 100644
@@ -1050,7 +1050,8 @@ static int miphy28lp_init(struct phy *phy)
 		ret = miphy28lp_init_usb3(miphy_phy);
 		break;
 	default:
-		return -EINVAL;
+		ret = -EINVAL;
+		break;
 	}
 
 	mutex_unlock(&miphy_dev->miphy_mutex);
Acked-by on v1 1/1
#1 lore raw

Thanks Dan !

Best Regards

Gabriel

Quoted 18 lines · Dan Carpenter

We need to unlock before returning the -EINVAL here.

drivers/phy/phy-miphy28lp.c +2 -1
index e34da13..27fa62c 100644
@@ -1050,7 +1050,8 @@ static int miphy28lp_init(struct phy *phy)
  		ret = miphy28lp_init_usb3(miphy_phy);
  		break;
  	default:
-		return -EINVAL;
+		ret = -EINVAL;
+		break;
  	}
 
  	mutex_unlock(&miphy_dev->miphy_mutex);