Skip to content

Commit

Permalink
ACPI / property: Switch to bitmap_zalloc()
Browse files Browse the repository at this point in the history
Switch to bitmap_zalloc() to show clearly what we are allocating.
Besides that it returns pointer of bitmap type instead of opaque void *.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Andy Shevchenko authored and Rafael J. Wysocki committed Sep 10, 2018
1 parent 11da3a7 commit d030fd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/x86/apple.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void acpi_extract_apple_properties(struct acpi_device *adev)
if (!numprops)
goto out_free;

valid = kcalloc(BITS_TO_LONGS(numprops), sizeof(long), GFP_KERNEL);
valid = bitmap_zalloc(numprops, GFP_KERNEL);
if (!valid)
goto out_free;

Expand Down Expand Up @@ -137,5 +137,5 @@ void acpi_extract_apple_properties(struct acpi_device *adev)

out_free:
ACPI_FREE(props);
kfree(valid);
bitmap_free(valid);
}

0 comments on commit d030fd0

Please sign in to comment.