summaryrefslogtreecommitdiff
path: root/drivers/video/backlight
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-22 20:51:36 -0400
committerRichard Purdie <rpurdie@linux.intel.com>2010-05-26 13:08:31 +0100
commit3e4a326df654d748d73600068fbdbdfed0b0db43 (patch)
tree802687d227e8f7c2e00dd752d241811501b5745a /drivers/video/backlight
parentb1cdc4670b9508fcd47a15fbd12f70d269880b37 (diff)
backlight: backlight_device_register() return ERR_PTR()
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>
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r--drivers/video/backlight/adx_bl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/backlight/adx_bl.c b/drivers/video/backlight/adx_bl.c
index 7f4a7c30a98b..fe9af129c5dd 100644
--- a/drivers/video/backlight/adx_bl.c
+++ b/drivers/video/backlight/adx_bl.c
@@ -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;
}