|
@@ -1062,13 +1062,12 @@ static void acpi_add_id(struct acpi_device *device, const char *dev_id)
|
|
if (!id)
|
|
if (!id)
|
|
return;
|
|
return;
|
|
|
|
|
|
- id->id = kmalloc(strlen(dev_id) + 1, GFP_KERNEL);
|
|
|
|
|
|
+ id->id = kstrdup(dev_id, GFP_KERNEL);
|
|
if (!id->id) {
|
|
if (!id->id) {
|
|
kfree(id);
|
|
kfree(id);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- strcpy(id->id, dev_id);
|
|
|
|
list_add_tail(&id->list, &device->pnp.ids);
|
|
list_add_tail(&id->list, &device->pnp.ids);
|
|
}
|
|
}
|
|
|
|
|