aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-12-30 02:51:38 -0500
committerLen Brown <len.brown@intel.com>2009-12-30 02:51:38 -0500
commitcccc67a4cf52a952e6371ac75510994e0bddec96 (patch)
treeedefd2ade7f72f0e517fd438ecb061a986906bf6
parentb943aa83f8038959999a6b12e469a875ab245a36 (diff)
parente01ce79b7f6ebc5b57128ee058811aa8f9059319 (diff)
downloadmrst-s0i3-test-cccc67a4cf52a952e6371ac75510994e0bddec96.tar.gz
mrst-s0i3-test-cccc67a4cf52a952e6371ac75510994e0bddec96.tar.xz
mrst-s0i3-test-cccc67a4cf52a952e6371ac75510994e0bddec96.zip
Merge branch 'video-error-case' into release
-rw-r--r--drivers/acpi/video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 3b063a6ac52..72e76b4b653 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)
sprintf(name, "acpi_video%d", count++);
device->backlight = backlight_device_register(name,
NULL, device, &acpi_backlight_ops);
- device->backlight->props.max_brightness = device->brightness->count-3;
kfree(name);
+ if (IS_ERR(device->backlight))
+ return;
+ device->backlight->props.max_brightness = device->brightness->count-3;
result = sysfs_create_link(&device->backlight->dev.kobj,
&device->dev->dev.kobj, "device");