* [patch 6/9] acpi: don't free non-existent backlight in acpi video module
@ 2009-08-06 22:57 akpm
2009-08-27 18:05 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2009-08-06 22:57 UTC (permalink / raw)
To: lenb; +Cc: linux-acpi, akpm, keithp, rui.zhang
From: Keith Packard <keithp@keithp.com>
acpi_video_put_one_device was attempting to remove sysfs entries and
unregister a backlight device without first checking that said backlight
device structure had been created.
Signed-off-by: Keith Packard <keithp@keithp.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/acpi/video.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff -puN drivers/acpi/video.c~acpi-dont-free-non-existent-backlight-in-acpi-video-module drivers/acpi/video.c
--- a/drivers/acpi/video.c~acpi-dont-free-non-existent-backlight-in-acpi-video-module
+++ a/drivers/acpi/video.c
@@ -2004,8 +2004,11 @@ static int acpi_video_bus_put_one_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");
_
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [patch 6/9] acpi: don't free non-existent backlight in acpi video module
2009-08-06 22:57 [patch 6/9] acpi: don't free non-existent backlight in acpi video module akpm
@ 2009-08-27 18:05 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2009-08-27 18:05 UTC (permalink / raw)
To: akpm; +Cc: linux-acpi, keithp, rui.zhang
Applied for 2.6.31
thanks,
Len Brown, Intel Open Source Technology Center
On Thu, 6 Aug 2009, akpm@linux-foundation.org wrote:
> From: Keith Packard <keithp@keithp.com>
>
> acpi_video_put_one_device was attempting to remove sysfs entries and
> unregister a backlight device without first checking that said backlight
> device structure had been created.
>
> Signed-off-by: Keith Packard <keithp@keithp.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Len Brown <lenb@kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/acpi/video.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff -puN drivers/acpi/video.c~acpi-dont-free-non-existent-backlight-in-acpi-video-module drivers/acpi/video.c
> --- a/drivers/acpi/video.c~acpi-dont-free-non-existent-backlight-in-acpi-video-module
> +++ a/drivers/acpi/video.c
> @@ -2004,8 +2004,11 @@ static int acpi_video_bus_put_one_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");
> _
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-27 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06 22:57 [patch 6/9] acpi: don't free non-existent backlight in acpi video module akpm
2009-08-27 18:05 ` Len Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.