Skip to content

Commit

Permalink
backlight: backlight_device_register() return ERR_PTR()
Browse files Browse the repository at this point in the history
backlight_device_register() returns a valid pointer or ERR_PTR() never
NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
  • Loading branch information
Dan Carpenter authored and Richard Purdie committed May 26, 2010
1 parent b1cdc46 commit 3e4a326
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/backlight/adx_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ static int __devinit adx_backlight_probe(struct platform_device *pdev)
props.max_brightness = 0xff;
bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev,
bl, &adx_backlight_ops, &props);
if (!bldev) {
ret = -ENOMEM;
if (IS_ERR(bldev)) {
ret = PTR_ERR(bldev);
goto out;
}

Expand Down

0 comments on commit 3e4a326

Please sign in to comment.