summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.c
diff options
context:
space:
mode:
authorRafael J. Wysocki2009-09-10 00:02:02 +0200
committerRafael J. Wysocki2009-09-10 00:02:02 +0200
commitbf992fa2bc1ad1bb2aeb0bdfadb43f236b9297fd (patch)
treed67f525c76b66956ba7ca0d40bc0fcda0e414700 /drivers/acpi/video.c
parentPM: Run-time PM platform device bus support (diff)
parentaoe: allocate unused request_queue for sysfs (diff)
downloadkernel-qcow2-linux-bf992fa2bc1ad1bb2aeb0bdfadb43f236b9297fd.tar.gz
kernel-qcow2-linux-bf992fa2bc1ad1bb2aeb0bdfadb43f236b9297fd.tar.xz
kernel-qcow2-linux-bf992fa2bc1ad1bb2aeb0bdfadb43f236b9297fd.zip
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r--drivers/acpi/video.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 8851315ce858..60ea984c84a0 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -2004,8 +2004,11 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device)
status = acpi_remove_notify_handler(device->dev->handle,
ACPI_DEVICE_NOTIFY,
acpi_video_device_notify);
- sysfs_remove_link(&device->backlight->dev.kobj, "device");
- backlight_device_unregister(device->backlight);
+ if (device->backlight) {
+ sysfs_remove_link(&device->backlight->dev.kobj, "device");
+ backlight_device_unregister(device->backlight);
+ device->backlight = NULL;
+ }
if (device->cdev) {
sysfs_remove_link(&device->dev->dev.kobj,
"thermal_cooling");