summaryrefslogtreecommitdiff
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorjhbird.choi@samsung.com <jhbird.choi@samsung.com>2014-03-20 11:35:56 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-04 18:23:33 +0400
commit2d0acb4af981e20eb626c6ea1925e95056220b2a (patch)
treed8dfa9464f7c03d02eaea362d0cd858e10882e97 /drivers/acpi/osl.c
parent70f6c087573eeb406252ff8d98f511eb5f71496e (diff)
downloadlinux-2d0acb4af981e20eb626c6ea1925e95056220b2a.tar.xz
ACPI: Clean up memory allocations
Use acpi_os_allocate_zeroed instead of acpi_os_allocate + memset. Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> [rjw: Subject and changelog] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index f7fd72ac69cf..6776c599816f 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1219,10 +1219,9 @@ acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
{
struct semaphore *sem = NULL;
- sem = acpi_os_allocate(sizeof(struct semaphore));
+ sem = acpi_os_allocate_zeroed(sizeof(struct semaphore));
if (!sem)
return AE_NO_MEMORY;
- memset(sem, 0, sizeof(struct semaphore));
sema_init(sem, initial_units);