diff --git a/[refs] b/[refs] index 41a64204d680..9f8ce24c5999 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 994fa63c5b126df6e9f31ef4e09000e2e243234b +refs/heads/master: f0c29583db51104a7bc223b1e9c88d818f24ba4d diff --git a/trunk/drivers/acpi/fan.c b/trunk/drivers/acpi/fan.c index f815da82c765..8d1c0105e113 100644 --- a/trunk/drivers/acpi/fan.c +++ b/trunk/drivers/acpi/fan.c @@ -174,9 +174,13 @@ static int acpi_fan_add(struct acpi_device *device) static int acpi_fan_remove(struct acpi_device *device) { - struct thermal_cooling_device *cdev = acpi_driver_data(device); + struct thermal_cooling_device *cdev; + + if (!device) + return -EINVAL; - if (!device || !cdev) + cdev = acpi_driver_data(device); + if (!cdev) return -EINVAL; sysfs_remove_link(&device->dev.kobj, "thermal_cooling");