kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] phy: miphy28lp: unlock on error in miphy28lp_init()
@ 2014-12-16 23:55 Dan Carpenter
  2014-12-17 10:23 ` Gabriel Fernandez
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-12-16 23:55 UTC (permalink / raw)
  To: kernel-janitors

We need to unlock before returning the -EINVAL here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c
index e34da13..27fa62c 100644
--- a/drivers/phy/phy-miphy28lp.c
+++ b/drivers/phy/phy-miphy28lp.c
@@ -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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] phy: miphy28lp: unlock on error in miphy28lp_init()
  2014-12-16 23:55 [patch] phy: miphy28lp: unlock on error in miphy28lp_init() Dan Carpenter
@ 2014-12-17 10:23 ` Gabriel Fernandez
  0 siblings, 0 replies; 2+ messages in thread
From: Gabriel Fernandez @ 2014-12-17 10:23 UTC (permalink / raw)
  To: kernel-janitors

Acked-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>


Thanks Dan !


Best Regards

Gabriel

On 12/17/2014 12:55 AM, Dan Carpenter wrote:
> We need to unlock before returning the -EINVAL here.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c
> index e34da13..27fa62c 100644
> --- a/drivers/phy/phy-miphy28lp.c
> +++ b/drivers/phy/phy-miphy28lp.c
> @@ -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);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-17 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 23:55 [patch] phy: miphy28lp: unlock on error in miphy28lp_init() Dan Carpenter
2014-12-17 10:23 ` Gabriel Fernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).