From cfa806f059801dbe7e435745eb2e187c8bfe1e7f Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Tue, 20 Jul 2010 15:18:36 -0700 Subject: gcc-4.6: ACPI: fix unused but set variables in ACPI Some minor improvements in error handling, but overall it was mostly dead code. Signed-off-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- drivers/acpi/video.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/acpi/video.c') diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 909ae7bf3b9..67dec0c675a 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -2167,7 +2167,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video, status = acpi_video_bus_get_one_device(dev, video); if (ACPI_FAILURE(status)) { printk(KERN_WARNING PREFIX - "Cant attach device"); + "Cant attach device\n"); continue; } } @@ -2177,19 +2177,19 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video, static int acpi_video_bus_put_one_device(struct acpi_video_device *device) { acpi_status status; - struct acpi_video_bus *video; - if (!device || !device->video) return -ENOENT; - video = device->video; - acpi_video_device_remove_fs(device->dev); status = acpi_remove_notify_handler(device->dev->handle, ACPI_DEVICE_NOTIFY, acpi_video_device_notify); + if (ACPI_FAILURE(status)) { + printk(KERN_WARNING PREFIX + "Cant remove video notify handler\n"); + } if (device->backlight) { sysfs_remove_link(&device->backlight->dev.kobj, "device"); backlight_device_unregister(device->backlight); -- cgit v1.2.3-18-g5258