lkml.org 
[lkml]   [2008]   [Feb]   [15]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
Patch in this message
/
Subject[patch 5/6] ACPI video: check for error in thermal_cooling_device_register call
DateFri, 15 Feb 2008 10:54:44 +0530
From"Thomas, Sujith" <>
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",[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2008-02-15 05:29    [from the cache]
©2003-2008