aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/fan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/fan.c')
-rw-r--r--drivers/acpi/fan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index c413e69fea8e..f305a826ca2d 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -186,10 +186,9 @@ static int acpi_fan_add(struct acpi_device *device)
186 if (!device) 186 if (!device)
187 return -EINVAL; 187 return -EINVAL;
188 188
189 fan = kmalloc(sizeof(struct acpi_fan), GFP_KERNEL); 189 fan = kzalloc(sizeof(struct acpi_fan), GFP_KERNEL);
190 if (!fan) 190 if (!fan)
191 return -ENOMEM; 191 return -ENOMEM;
192 memset(fan, 0, sizeof(struct acpi_fan));
193 192
194 fan->device = device; 193 fan->device = device;
195 strcpy(acpi_device_name(device), "Fan"); 194 strcpy(acpi_device_name(device), "Fan");