projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02f22c0
)
backlight: pwm_bl: Free PWM requested by legacy API on error path
author
Vladimir Zapolskiy
<vladimir_zapolskiy@mentor.com>
Sun, 14 Jun 2015 14:32:14 +0000
(17:32 +0300)
committer
Lee Jones
<lee.jones@linaro.org>
Mon, 11 Jan 2016 10:45:24 +0000
(10:45 +0000)
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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/pwm_bl.c
patch
|
blob
|
history
diff --git
a/drivers/video/backlight/pwm_bl.c
b/drivers/video/backlight/pwm_bl.c
index a22c1ec29de754c0de475b38a9785f47c0454c1c..64f9e1b8655f4b29f64f95c6cf9b3a0e9cc04c6d 100644
(file)
--- a/
drivers/video/backlight/pwm_bl.c
+++ b/
drivers/video/backlight/pwm_bl.c
@@
-328,6
+328,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;
}