mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
b1cdc4670b
commit
3e4a326df6
|
@ -107,8 +107,8 @@ static int __devinit adx_backlight_probe(struct platform_device *pdev)
|
||||||
props.max_brightness = 0xff;
|
props.max_brightness = 0xff;
|
||||||
bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev,
|
bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev,
|
||||||
bl, &adx_backlight_ops, &props);
|
bl, &adx_backlight_ops, &props);
|
||||||
if (!bldev) {
|
if (IS_ERR(bldev)) {
|
||||||
ret = -ENOMEM;
|
ret = PTR_ERR(bldev);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue