* [PATCH] backlight: pwm: free pwm requested by legacy API on error path
@ 2015-06-14 14:32 Vladimir Zapolskiy
2015-09-21 15:15 ` Vladimir Zapolskiy
2015-09-21 23:23 ` Lee Jones
0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Zapolskiy @ 2015-06-14 14:32 UTC (permalink / raw)
To: Lee Jones, Jingoo Han, Thierry Reding; +Cc: linux-pwm, linux-fbdev
If pwm is requested by legacy pwm_request() and if the following
backlight_device_register() call fails, add pwm_free() clean-up.
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
---
drivers/video/backlight/pwm_bl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 9991cdb..a691247 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -307,6 +307,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
if (IS_ERR(bl)) {
dev_err(&pdev->dev, "failed to register backlight\n");
ret = PTR_ERR(bl);
+ if (pb->legacy)
+ pwm_free(pb->pwm);
goto err_alloc;
}
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] backlight: pwm: free pwm requested by legacy API on error path
2015-06-14 14:32 [PATCH] backlight: pwm: free pwm requested by legacy API on error path Vladimir Zapolskiy
@ 2015-09-21 15:15 ` Vladimir Zapolskiy
2015-09-21 23:23 ` Lee Jones
1 sibling, 0 replies; 5+ messages in thread
From: Vladimir Zapolskiy @ 2015-09-21 15:15 UTC (permalink / raw)
To: Lee Jones, Jingoo Han, Thierry Reding; +Cc: linux-pwm, linux-fbdev
Lee, Thierry,
On 14.06.2015 17:32, Vladimir Zapolskiy wrote:
> If pwm is requested by legacy pwm_request() and if the following
> backlight_device_register() call fails, add pwm_free() clean-up.
>
> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
> ---
> drivers/video/backlight/pwm_bl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
> index 9991cdb..a691247 100644
> --- a/drivers/video/backlight/pwm_bl.c
> +++ b/drivers/video/backlight/pwm_bl.c
> @@ -307,6 +307,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
> if (IS_ERR(bl)) {
> dev_err(&pdev->dev, "failed to register backlight\n");
> ret = PTR_ERR(bl);
> + if (pb->legacy)
> + pwm_free(pb->pwm);
> goto err_alloc;
> }
>
>
could you please apply this trivial fix?
Thank you in advance.
--
With best wishes,
Vladimir
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] backlight: pwm: free pwm requested by legacy API on error path
2015-06-14 14:32 [PATCH] backlight: pwm: free pwm requested by legacy API on error path Vladimir Zapolskiy
2015-09-21 15:15 ` Vladimir Zapolskiy
@ 2015-09-21 23:23 ` Lee Jones
2016-01-04 15:20 ` Vladimir Zapolskiy
1 sibling, 1 reply; 5+ messages in thread
From: Lee Jones @ 2015-09-21 23:23 UTC (permalink / raw)
To: Vladimir Zapolskiy; +Cc: Jingoo Han, Thierry Reding, linux-pwm, linux-fbdev
On Sun, 14 Jun 2015, Vladimir Zapolskiy wrote:
> If pwm is requested by legacy pwm_request() and if the following
> backlight_device_register() call fails, add pwm_free() clean-up.
>
> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
> ---
> drivers/video/backlight/pwm_bl.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks.
> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
> index 9991cdb..a691247 100644
> --- a/drivers/video/backlight/pwm_bl.c
> +++ b/drivers/video/backlight/pwm_bl.c
> @@ -307,6 +307,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
> if (IS_ERR(bl)) {
> dev_err(&pdev->dev, "failed to register backlight\n");
> ret = PTR_ERR(bl);
> + if (pb->legacy)
> + pwm_free(pb->pwm);
> goto err_alloc;
> }
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] backlight: pwm: free pwm requested by legacy API on error path
2015-09-21 23:23 ` Lee Jones
@ 2016-01-04 15:20 ` Vladimir Zapolskiy
2016-01-11 9:39 ` Lee Jones
0 siblings, 1 reply; 5+ messages in thread
From: Vladimir Zapolskiy @ 2016-01-04 15:20 UTC (permalink / raw)
To: Lee Jones; +Cc: Jingoo Han, Thierry Reding, linux-pwm, linux-fbdev
Hi Lee,
On 22.09.2015 02:23, Lee Jones wrote:
> On Sun, 14 Jun 2015, Vladimir Zapolskiy wrote:
>
>> If pwm is requested by legacy pwm_request() and if the following
>> backlight_device_register() call fails, add pwm_free() clean-up.
>>
>> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
>> ---
>> drivers/video/backlight/pwm_bl.c | 2 ++
>> 1 file changed, 2 insertions(+)
>
> Applied, thanks.
>
I've just encountered that this change is not present in v4.4-rc, also it is
not in yours for-backlight-next branch, could you please double check the
status of the change?
Thank you in advance.
Best wishes,
Vladimir
>> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
>> index 9991cdb..a691247 100644
>> --- a/drivers/video/backlight/pwm_bl.c
>> +++ b/drivers/video/backlight/pwm_bl.c
>> @@ -307,6 +307,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
>> if (IS_ERR(bl)) {
>> dev_err(&pdev->dev, "failed to register backlight\n");
>> ret = PTR_ERR(bl);
>> + if (pb->legacy)
>> + pwm_free(pb->pwm);
>> goto err_alloc;
>> }
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] backlight: pwm: free pwm requested by legacy API on error path
2016-01-04 15:20 ` Vladimir Zapolskiy
@ 2016-01-11 9:39 ` Lee Jones
0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2016-01-11 9:39 UTC (permalink / raw)
To: Vladimir Zapolskiy; +Cc: Jingoo Han, Thierry Reding, linux-pwm, linux-fbdev
On Mon, 04 Jan 2016, Vladimir Zapolskiy wrote:
> On 22.09.2015 02:23, Lee Jones wrote:
> > On Sun, 14 Jun 2015, Vladimir Zapolskiy wrote:
> >
> >> If pwm is requested by legacy pwm_request() and if the following
> >> backlight_device_register() call fails, add pwm_free() clean-up.
> >>
> >> Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
> >> ---
> >> drivers/video/backlight/pwm_bl.c | 2 ++
> >> 1 file changed, 2 insertions(+)
> >
> > Applied, thanks.
> >
>
> I've just encountered that this change is not present in v4.4-rc, also it is
> not in yours for-backlight-next branch, could you please double check the
> status of the change?
Looks like this slipped though the gaps.
Reapplied, thanks.
> >> diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
> >> index 9991cdb..a691247 100644
> >> --- a/drivers/video/backlight/pwm_bl.c
> >> +++ b/drivers/video/backlight/pwm_bl.c
> >> @@ -307,6 +307,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
> >> if (IS_ERR(bl)) {
> >> dev_err(&pdev->dev, "failed to register backlight\n");
> >> ret = PTR_ERR(bl);
> >> + if (pb->legacy)
> >> + pwm_free(pb->pwm);
> >> goto err_alloc;
> >> }
> >>
> >
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-11 9:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-14 14:32 [PATCH] backlight: pwm: free pwm requested by legacy API on error path Vladimir Zapolskiy
2015-09-21 15:15 ` Vladimir Zapolskiy
2015-09-21 23:23 ` Lee Jones
2016-01-04 15:20 ` Vladimir Zapolskiy
2016-01-11 9:39 ` Lee Jones
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).