[patch 5/6] ACPI video: check for error in thermal_cooling_device_register call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Thomas Sujith <sujith.thomas@xxxxxxxxx>

Need to check whetherthermal_cooling_device_register
returned ERROR or not.

Signed-off-by: Thomas Sujith <sujith.thomas@xxxxxxxxx>
---

 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: [patch 5 of 6] ACPI video - check for error in cooling_device_register
Description: [patch 5 of 6] ACPI video - check for error in cooling_device_register

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux