mwifiex: improve AMSDU packet aggregation for PCIe and SDIO
[firefly-linux-kernel-4.4.55.git] / drivers / acpi / osl.c
index f7fd72ac69cf52839e6bd92a9f503fc8e7c66dad..6776c599816f33100a2403ae7286e534f0a96354 100644 (file)
@@ -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);