diff mbox

[RESEND,1/3] PM / devfreq: exynos4_bus: Fix missing mutex_unlock if opp_find_freq_floor fails

Message ID 1365746058.4025.1.camel@phoenix (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Axel Lin April 12, 2013, 5:54 a.m. UTC
We need to call mutex_unlock() in the error path.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/devfreq/exynos4_bus.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Rafael Wysocki April 12, 2013, 11:51 a.m. UTC | #1
On Friday, April 12, 2013 01:54:18 PM Axel Lin wrote:
> We need to call mutex_unlock() in the error path.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

All three patches applied to linux-pm.git/linux-next.

Exynos maintainers, if you have any objections, please holler.

Thanks,
Rafael

> ---
>  drivers/devfreq/exynos4_bus.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
> index 1deee09..54b9615 100644
> --- a/drivers/devfreq/exynos4_bus.c
> +++ b/drivers/devfreq/exynos4_bus.c
> @@ -974,7 +974,8 @@ static int exynos4_busfreq_pm_notifier_event(struct notifier_block *this,
>  			rcu_read_unlock();
>  			dev_err(data->dev, "%s: unable to find a min freq\n",
>  				__func__);
> -			return PTR_ERR(opp);
> +			err = PTR_ERR(opp);
> +			goto unlock;
>  		}
>  		new_oppinfo.rate = opp_get_freq(opp);
>  		new_oppinfo.volt = opp_get_voltage(opp);
>
MyungJoo Ham April 12, 2013, 12:11 p.m. UTC | #2
> On Friday, April 12, 2013 11:52:01 AM ??? wrote:
> > > On Friday, April 12, 2013 01:54:18 PM Axel Lin wrote:
> > > > We need to call mutex_unlock() in the error path.
> > > > 
> > > > Signed-off-by: Axel Lin <axel.lin@ingics.com>
> > > 
> > > All three patches applied to linux-pm.git/linux-next.
> > > 
> > > Exynos maintainers, if you have any objections, please holler.
> > > 
> > > Thanks,
> > > Rafael
> > 
> > This patch was included in the last pull-request patchset
> > though the path was updated. (its precedessor patch moved
> > exynos drivers to /drivers/devfreq/exynos/* after adding
> > Exynos common driver files)
> 
> OK, so do you want me to drop it?
> 
> What about the remaining two?

Yes, please drop 1/3. It's duplicated.

The patches 2~3/3 can wait. They are actually not bugfixes.

> 
> Do you have any more devfreq patches for me to take into v3.10?  If so,
> please send a pull request ASAP.
> 
> Thanks,
> Rafael
> 
> 
> > > 
> > > > ---
> > > >  drivers/devfreq/exynos4_bus.c |    3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
> > > > index 1deee09..54b9615 100644
> > > > --- a/drivers/devfreq/exynos4_bus.c
> > > > +++ b/drivers/devfreq/exynos4_bus.c
> > > > @@ -974,7 +974,8 @@ static int exynos4_busfreq_pm_notifier_event(struct notifier_block *this,
> > > >  			rcu_read_unlock();
> > > >  			dev_err(data->dev, "%s: unable to find a min freq\n",
> > > >  				__func__);
> > > > -			return PTR_ERR(opp);
> > > > +			err = PTR_ERR(opp);
> > > > +			goto unlock;
> > > >  		}
> > > >  		new_oppinfo.rate = opp_get_freq(opp);
> > > >  		new_oppinfo.volt = opp_get_voltage(opp);
> > > > 
> > > -- 
> > > I speak only for myself.
> > > Rafael J. Wysocki, Intel Open Source Technology Center.
> > > 
> > > 
> > > 
> > >        
> > >   
> > >          
> > > 
> 
> -- 
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.
> 
> 
> 
>        
>   
>          
>

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki April 12, 2013, 11:20 p.m. UTC | #3
On Friday, April 12, 2013 09:11:00 PM myungjoo.ham wrote:
> > On Friday, April 12, 2013 11:52:01 AM ??? wrote:
> > > > On Friday, April 12, 2013 01:54:18 PM Axel Lin wrote:
> > > > > We need to call mutex_unlock() in the error path.
> > > > > 
> > > > > Signed-off-by: Axel Lin <axel.lin@ingics.com>
> > > > 
> > > > All three patches applied to linux-pm.git/linux-next.
> > > > 
> > > > Exynos maintainers, if you have any objections, please holler.
> > > > 
> > > > Thanks,
> > > > Rafael
> > > 
> > > This patch was included in the last pull-request patchset
> > > though the path was updated. (its precedessor patch moved
> > > exynos drivers to /drivers/devfreq/exynos/* after adding
> > > Exynos common driver files)
> > 
> > OK, so do you want me to drop it?
> > 
> > What about the remaining two?
> 
> Yes, please drop 1/3. It's duplicated.
> 
> The patches 2~3/3 can wait. They are actually not bugfixes.

OK, I've dropped all three.

Axel, please push [2-3/3] thorugh the Exynos tree.

Thanks,
Rafael


> > > > > ---
> > > > >  drivers/devfreq/exynos4_bus.c |    3 ++-
> > > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
> > > > > index 1deee09..54b9615 100644
> > > > > --- a/drivers/devfreq/exynos4_bus.c
> > > > > +++ b/drivers/devfreq/exynos4_bus.c
> > > > > @@ -974,7 +974,8 @@ static int exynos4_busfreq_pm_notifier_event(struct notifier_block *this,
> > > > >  			rcu_read_unlock();
> > > > >  			dev_err(data->dev, "%s: unable to find a min freq\n",
> > > > >  				__func__);
> > > > > -			return PTR_ERR(opp);
> > > > > +			err = PTR_ERR(opp);
> > > > > +			goto unlock;
> > > > >  		}
> > > > >  		new_oppinfo.rate = opp_get_freq(opp);
> > > > >  		new_oppinfo.volt = opp_get_voltage(opp);
> > > > > 
> > 
> >
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Axel Lin April 13, 2013, 1:40 a.m. UTC | #4
2013/4/13 Rafael J. Wysocki <rjw@sisk.pl>:
> On Friday, April 12, 2013 09:11:00 PM myungjoo.ham wrote:
>> > On Friday, April 12, 2013 11:52:01 AM ??? wrote:
>> > > > On Friday, April 12, 2013 01:54:18 PM Axel Lin wrote:
>> > > > > We need to call mutex_unlock() in the error path.
>> > > > >
>> > > > > Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> > > >
>> > > > All three patches applied to linux-pm.git/linux-next.
>> > > >
>> > > > Exynos maintainers, if you have any objections, please holler.
>> > > >
>> > > > Thanks,
>> > > > Rafael
>> > >
>> > > This patch was included in the last pull-request patchset
>> > > though the path was updated. (its precedessor patch moved
>> > > exynos drivers to /drivers/devfreq/exynos/* after adding
>> > > Exynos common driver files)
>> >
>> > OK, so do you want me to drop it?
>> >
>> > What about the remaining two?
>>
>> Yes, please drop 1/3. It's duplicated.
>>
>> The patches 2~3/3 can wait. They are actually not bugfixes.
>
> OK, I've dropped all three.
>
> Axel, please push [2-3/3] thorugh the Exynos tree.

I thought I already Cc all devfreq maintainers.
Is there any other thing I need to do?

Regards,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki April 17, 2013, 4:39 p.m. UTC | #5
On Saturday, April 13, 2013 09:40:49 AM Axel Lin wrote:
> 2013/4/13 Rafael J. Wysocki <rjw@sisk.pl>:
> > On Friday, April 12, 2013 09:11:00 PM myungjoo.ham wrote:
> >> > On Friday, April 12, 2013 11:52:01 AM ??? wrote:
> >> > > > On Friday, April 12, 2013 01:54:18 PM Axel Lin wrote:
> >> > > > > We need to call mutex_unlock() in the error path.
> >> > > > >
> >> > > > > Signed-off-by: Axel Lin <axel.lin@ingics.com>
> >> > > >
> >> > > > All three patches applied to linux-pm.git/linux-next.
> >> > > >
> >> > > > Exynos maintainers, if you have any objections, please holler.
> >> > > >
> >> > > > Thanks,
> >> > > > Rafael
> >> > >
> >> > > This patch was included in the last pull-request patchset
> >> > > though the path was updated. (its precedessor patch moved
> >> > > exynos drivers to /drivers/devfreq/exynos/* after adding
> >> > > Exynos common driver files)
> >> >
> >> > OK, so do you want me to drop it?
> >> >
> >> > What about the remaining two?
> >>
> >> Yes, please drop 1/3. It's duplicated.
> >>
> >> The patches 2~3/3 can wait. They are actually not bugfixes.
> >
> > OK, I've dropped all three.
> >
> > Axel, please push [2-3/3] thorugh the Exynos tree.
> 
> I thought I already Cc all devfreq maintainers.
> Is there any other thing I need to do?

Just please let them know that you'd like them to take the patches, not me. :-)

Thanks,
Rafael
diff mbox

Patch

diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
index 1deee09..54b9615 100644
--- a/drivers/devfreq/exynos4_bus.c
+++ b/drivers/devfreq/exynos4_bus.c
@@ -974,7 +974,8 @@  static int exynos4_busfreq_pm_notifier_event(struct notifier_block *this,
 			rcu_read_unlock();
 			dev_err(data->dev, "%s: unable to find a min freq\n",
 				__func__);
-			return PTR_ERR(opp);
+			err = PTR_ERR(opp);
+			goto unlock;
 		}
 		new_oppinfo.rate = opp_get_freq(opp);
 		new_oppinfo.volt = opp_get_voltage(opp);