diff options
author | Thomas Sujith <sujith.thomas@intel.com> | 2008-02-15 18:29:18 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-15 18:29:18 -0500 |
commit | 43ff39f2f6450fa2e9a566f8bf007a26d76f2c9d (patch) | |
tree | 71a83f60ac43fab642d29e838f5c5151e85dc585 /drivers/acpi/video.c | |
parent | d76628c67cdeebf84766a19c67c821c2e518baa4 (diff) |
ACPI video: check for error from thermal_cooling_device_register
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>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 7f714fa2a454..12cce69b5441 100644 --- 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) | |||
731 | 731 | ||
732 | device->cdev = thermal_cooling_device_register("LCD", | 732 | device->cdev = thermal_cooling_device_register("LCD", |
733 | device->dev, &video_cooling_ops); | 733 | device->dev, &video_cooling_ops); |
734 | if (IS_ERR(device->cdev)) | ||
735 | return; | ||
736 | |||
734 | if (device->cdev) { | 737 | if (device->cdev) { |
735 | printk(KERN_INFO PREFIX | 738 | printk(KERN_INFO PREFIX |
736 | "%s is registered as cooling_device%d\n", | 739 | "%s is registered as cooling_device%d\n", |