irqchip/mvebu-odmi: Switch to bitmap_zalloc()

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>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210618151657.65305-7-andriy.shevchenko@linux.intel.com
This commit is contained in:
Andy Shevchenko 2021-06-18 18:16:57 +03:00 committed by Marc Zyngier
parent 3db3969f53
commit c980983dae

View File

@ -171,8 +171,7 @@ static int __init mvebu_odmi_init(struct device_node *node,
if (!odmis) if (!odmis)
return -ENOMEM; return -ENOMEM;
odmis_bm = kcalloc(BITS_TO_LONGS(odmis_count * NODMIS_PER_FRAME), odmis_bm = bitmap_zalloc(odmis_count * NODMIS_PER_FRAME, GFP_KERNEL);
sizeof(long), GFP_KERNEL);
if (!odmis_bm) { if (!odmis_bm) {
ret = -ENOMEM; ret = -ENOMEM;
goto err_alloc; goto err_alloc;
@ -227,7 +226,7 @@ err_unmap:
if (odmi->base && !IS_ERR(odmi->base)) if (odmi->base && !IS_ERR(odmi->base))
iounmap(odmis[i].base); iounmap(odmis[i].base);
} }
kfree(odmis_bm); bitmap_free(odmis_bm);
err_alloc: err_alloc:
kfree(odmis); kfree(odmis);
return ret; return ret;