Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107672
b: refs/heads/master
c: 14563a4
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Linus Torvalds committed Aug 5, 2008
1 parent f5bb439 commit 5b3108c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 26cb8bb21b11245a53f79d9fa766537752f77d88
refs/heads/master: 14563a4ec450f35c70fbe5f6ac5199e9d5a0edc5
8 changes: 6 additions & 2 deletions trunk/drivers/video/backlight/pwm_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
struct pwm_bl_data *pb;
int ret;

if (!data)
if (!data) {
dev_err(&pdev->dev, "failed to find platform data\n");
return -EINVAL;
}

if (data->init) {
ret = data->init(&pdev->dev);
Expand All @@ -79,6 +81,7 @@ static int pwm_backlight_probe(struct platform_device *pdev)

pb = kzalloc(sizeof(*pb), GFP_KERNEL);
if (!pb) {
dev_err(&pdev->dev, "no memory for state\n");
ret = -ENOMEM;
goto err_alloc;
}
Expand All @@ -91,7 +94,8 @@ static int pwm_backlight_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "unable to request PWM for backlight\n");
ret = PTR_ERR(pb->pwm);
goto err_pwm;
}
} else
dev_dbg(&pdev->dev, "got pwm for backlight\n");

bl = backlight_device_register(pdev->name, &pdev->dev,
pb, &pwm_backlight_ops);
Expand Down

0 comments on commit 5b3108c

Please sign in to comment.