Skip to content

Commit

Permalink
ACPI video: check for error from thermal_cooling_device_register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Sujith authored and Len Brown committed Feb 15, 2008
1 parent d76628c commit 43ff39f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 43ff39f

Please sign in to comment.