Commit 3e4a326d authored by Dan Carpenter's avatar Dan Carpenter Committed by Richard Purdie

backlight: backlight_device_register() return ERR_PTR()

backlight_device_register() returns a valid pointer or ERR_PTR() never
NULL.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent b1cdc467
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment