Skip to content

Commit

Permalink
ACPICA: Use os_allocate_zeroed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Moore authored and Rafael J. Wysocki committed Aug 13, 2016
1 parent d8303ac commit 9556ec4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/acpi/acpica/uttrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9556ec4

Please sign in to comment.