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>
This commit is contained in:
Thomas Sujith 2008-02-15 18:29:18 -05:00 коммит произвёл Len Brown
Родитель d76628c67c
Коммит 43ff39f2f6
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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",