diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-23 00:51:36 (GMT) |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-05-26 12:08:31 (GMT) |
commit | 3e4a326df654d748d73600068fbdbdfed0b0db43 (patch) | |
tree | 802687d227e8f7c2e00dd752d241811501b5745a /drivers/video | |
parent | b1cdc4670b9508fcd47a15fbd12f70d269880b37 (diff) | |
download | linux-3e4a326df654d748d73600068fbdbdfed0b0db43.tar.xz |
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')
-rw-r--r-- | drivers/video/backlight/adx_bl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/backlight/adx_bl.c b/drivers/video/backlight/adx_bl.c index 7f4a7c3..fe9af12 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; } |