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 <[email protected]>
Reviewed-by: Lukas Wunner <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
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;
out_free:
ACPI_FREE(props);
- kfree(valid);
+ bitmap_free(valid);
}