Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165298
b: refs/heads/master
c: 4b4fe3b
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov authored and Len Brown committed Aug 30, 2009
1 parent 4f44f55 commit 4682b4f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e231fa4cbd3ff53fcb7d76eccd6fd86a152a95f
refs/heads/master: 4b4fe3b62e8d88068083218d3e42c45223b51d29
12 changes: 11 additions & 1 deletion trunk/drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,18 @@ 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))
if (IS_ERR(device->cdev)) {
/*
* Set cdev to NULL so we don't crash trying to
* free it.
* Also, why the hell we are returning early and
* not attempt to register video output if cooling
* device registration failed?
* -- dtor
*/
device->cdev = NULL;
return;
}

dev_info(&device->dev->dev, "registered as cooling_device%d\n",
device->cdev->id);
Expand Down

0 comments on commit 4682b4f

Please sign in to comment.