projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d76628c
)
ACPI video: check for error from thermal_cooling_device_register
author
Thomas Sujith
<sujith.thomas@intel.com>
Fri, 15 Feb 2008 23:29:18 +0000
(18:29 -0500)
committer
Len Brown
<len.brown@intel.com>
Fri, 15 Feb 2008 23:29:18 +0000
(18:29 -0500)
Need to check whether thermal_cooling_device_register
returned ERROR or not.
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/video.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/acpi/video.c
b/drivers/acpi/video.c
index 7f714fa2a4547d284323d85441e60a9c6b61600f..12cce69b5441e98a7bd8da23031dc250daaa88f1 100644
(file)
--- a/
drivers/acpi/video.c
+++ b/
drivers/acpi/video.c
@@
-731,6
+731,9
@@
static void acpi_video_device_find_cap(struct acpi_video_device *device)
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",