Message ID | 1345481724-30108-2-git-send-email-jim@meyering.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 7c3f98b..20cc627 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -674,10 +674,9 @@ void acpi_irq_stats_init(void) else sprintf(buffer, "bug%02X", i); - name = kzalloc(strlen(buffer) + 1, GFP_KERNEL); + name = kstrdup(buffer, GFP_KERNEL); if (name == NULL) goto fail; - strncpy(name, buffer, strlen(buffer) + 1); sysfs_attr_init(&counter_attrs[i].attr); counter_attrs[i].attr.name = name;