ACPICA: Use os_allocate_zeroed
authorBob Moore <robert.moore@intel.com>
Thu, 4 Aug 2016 08:43:32 +0000 (16:43 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 13 Aug 2016 01:09:33 +0000 (03:09 +0200)
ACPICA commit 2b896c59e53243c95600f2a3f7e1fd02c044cb37

Eliminates an unnecessary memset.

Suggested-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Link: https://github.com/acpica/acpica/commit/2b896c59
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/uttrack.c

index 0df07dfa53b6acccdce504f8b69de283f61677dc..df31d71ce596fa7279566940fe6f78f7ca554ce3 100644 (file)
@@ -95,13 +95,11 @@ acpi_ut_create_list(const char *list_name,
 {
        struct acpi_memory_list *cache;
 
-       cache = acpi_os_allocate(sizeof(struct acpi_memory_list));
+       cache = acpi_os_allocate_zeroed(sizeof(struct acpi_memory_list));
        if (!cache) {
                return (AE_NO_MEMORY);
        }
 
-       memset(cache, 0, sizeof(struct acpi_memory_list));
-
        cache->list_name = list_name;
        cache->object_size = object_size;