LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch 5/6] ACPI video: check for error in thermal_cooling_device_register call
@ 2008-02-15 5:24 Thomas, Sujith
0 siblings, 0 replies; only message in thread
From: Thomas, Sujith @ 2008-02-15 5:24 UTC (permalink / raw)
To: Andrew Morton; +Cc: lenb, mingo, linux-acpi, linux-kernel, linux-pm, Zhang, Rui
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
From: Thomas Sujith <sujith.thomas@intel.com>
Need to check whetherthermal_cooling_device_register
returned ERROR or not.
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
---
drivers/acpi/video.c | 3 +++
1 files changed, 3 insertions(+)
Index: linux-2.6.24/drivers/acpi/video.c
===================================================================
--- linux-2.6.24.orig/drivers/acpi/video.c
+++ linux-2.6.24/drivers/acpi/video.c
@@ -731,6 +731,9 @@ static void acpi_video_device_find_cap(s
device->cdev = thermal_cooling_device_register("LCD",
device->dev,
&video_cooling_ops);
+ if (IS_ERR(device->cdev))
+ return;
+
if (device->cdev) {
printk(KERN_INFO PREFIX
"%s is registered as
cooling_device%d\n",
[-- Attachment #2: [patch 5 of 6] ACPI video - check for error in cooling_device_register --]
[-- Type: application/octet-stream, Size: 743 bytes --]
From: Thomas Sujith <sujith.thomas@intel.com>
Need to check whetherthermal_cooling_device_register
returned ERROR or not.
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
---
drivers/acpi/video.c | 3 +++
1 files changed, 3 insertions(+)
Index: linux-2.6.24/drivers/acpi/video.c
===================================================================
--- linux-2.6.24.orig/drivers/acpi/video.c
+++ linux-2.6.24/drivers/acpi/video.c
@@ -731,6 +731,9 @@ static void acpi_video_device_find_cap(s
device->cdev = thermal_cooling_device_register("LCD",
device->dev, &video_cooling_ops);
+ if (IS_ERR(device->cdev))
+ return;
+
if (device->cdev) {
printk(KERN_INFO PREFIX
"%s is registered as cooling_device%d\n",
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-15 5:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-15 5:24 [patch 5/6] ACPI video: check for error in thermal_cooling_device_register call Thomas, Sujith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).