diff options
Diffstat (limited to 'drivers/acpi/sysfs.c')
-rw-r--r-- | drivers/acpi/sysfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 4fc59c3bc673..41324f0b1bee 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c | |||
@@ -857,12 +857,12 @@ void acpi_irq_stats_init(void) | |||
857 | num_gpes = acpi_current_gpe_count; | 857 | num_gpes = acpi_current_gpe_count; |
858 | num_counters = num_gpes + ACPI_NUM_FIXED_EVENTS + NUM_COUNTERS_EXTRA; | 858 | num_counters = num_gpes + ACPI_NUM_FIXED_EVENTS + NUM_COUNTERS_EXTRA; |
859 | 859 | ||
860 | all_attrs = kzalloc(sizeof(struct attribute *) * (num_counters + 1), | 860 | all_attrs = kcalloc(num_counters + 1, sizeof(struct attribute *), |
861 | GFP_KERNEL); | 861 | GFP_KERNEL); |
862 | if (all_attrs == NULL) | 862 | if (all_attrs == NULL) |
863 | return; | 863 | return; |
864 | 864 | ||
865 | all_counters = kzalloc(sizeof(struct event_counter) * (num_counters), | 865 | all_counters = kcalloc(num_counters, sizeof(struct event_counter), |
866 | GFP_KERNEL); | 866 | GFP_KERNEL); |
867 | if (all_counters == NULL) | 867 | if (all_counters == NULL) |
868 | goto fail; | 868 | goto fail; |
@@ -871,7 +871,7 @@ void acpi_irq_stats_init(void) | |||
871 | if (ACPI_FAILURE(status)) | 871 | if (ACPI_FAILURE(status)) |
872 | goto fail; | 872 | goto fail; |
873 | 873 | ||
874 | counter_attrs = kzalloc(sizeof(struct kobj_attribute) * (num_counters), | 874 | counter_attrs = kcalloc(num_counters, sizeof(struct kobj_attribute), |
875 | GFP_KERNEL); | 875 | GFP_KERNEL); |
876 | if (counter_attrs == NULL) | 876 | if (counter_attrs == NULL) |
877 | goto fail; | 877 | goto fail; |