aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/pwm_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/pwm_bl.c')
-rw-r--r--drivers/video/backlight/pwm_bl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 6338d0e2fe07..441e5a707d37 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -68,8 +68,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
68 struct pwm_bl_data *pb; 68 struct pwm_bl_data *pb;
69 int ret; 69 int ret;
70 70
71 if (!data) 71 if (!data) {
72 dev_err(&pdev->dev, "failed to find platform data\n");
72 return -EINVAL; 73 return -EINVAL;
74 }
73 75
74 if (data->init) { 76 if (data->init) {
75 ret = data->init(&pdev->dev); 77 ret = data->init(&pdev->dev);
@@ -79,6 +81,7 @@ static int pwm_backlight_probe(struct platform_device *pdev)
79 81
80 pb = kzalloc(sizeof(*pb), GFP_KERNEL); 82 pb = kzalloc(sizeof(*pb), GFP_KERNEL);
81 if (!pb) { 83 if (!pb) {
84 dev_err(&pdev->dev, "no memory for state\n");
82 ret = -ENOMEM; 85 ret = -ENOMEM;
83 goto err_alloc; 86 goto err_alloc;
84 } 87 }
@@ -91,7 +94,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
91 dev_err(&pdev->dev, "unable to request PWM for backlight\n"); 94 dev_err(&pdev->dev, "unable to request PWM for backlight\n");
92 ret = PTR_ERR(pb->pwm); 95 ret = PTR_ERR(pb->pwm);
93 goto err_pwm; 96 goto err_pwm;
94 } 97 } else
98 dev_dbg(&pdev->dev, "got pwm for backlight\n");
95 99
96 bl = backlight_device_register(pdev->name, &pdev->dev, 100 bl = backlight_device_register(pdev->name, &pdev->dev,
97 pb, &pwm_backlight_ops); 101 pb, &pwm_backlight_ops);