diff options
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 05dff631591c..3f685db1a76d 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -999,8 +999,10 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
999 | sprintf(name, "acpi_video%d", count++); | 999 | sprintf(name, "acpi_video%d", count++); |
1000 | device->backlight = backlight_device_register(name, | 1000 | device->backlight = backlight_device_register(name, |
1001 | NULL, device, &acpi_backlight_ops); | 1001 | NULL, device, &acpi_backlight_ops); |
1002 | device->backlight->props.max_brightness = device->brightness->count-3; | ||
1003 | kfree(name); | 1002 | kfree(name); |
1003 | if (IS_ERR(device->backlight)) | ||
1004 | return; | ||
1005 | device->backlight->props.max_brightness = device->brightness->count-3; | ||
1004 | 1006 | ||
1005 | result = sysfs_create_link(&device->backlight->dev.kobj, | 1007 | result = sysfs_create_link(&device->backlight->dev.kobj, |
1006 | &device->dev->dev.kobj, "device"); | 1008 | &device->dev->dev.kobj, "device"); |