mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
irqchip/alpine-msi: 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-2-andriy.shevchenko@linux.intel.com
This commit is contained in:
parent
4cad4da079
commit
3f1808f63f
1 changed files with 2 additions and 4 deletions
|
@ -267,9 +267,7 @@ static int alpine_msix_init(struct device_node *node,
|
|||
goto err_priv;
|
||||
}
|
||||
|
||||
priv->msi_map = kcalloc(BITS_TO_LONGS(priv->num_spis),
|
||||
sizeof(*priv->msi_map),
|
||||
GFP_KERNEL);
|
||||
priv->msi_map = bitmap_zalloc(priv->num_spis, GFP_KERNEL);
|
||||
if (!priv->msi_map) {
|
||||
ret = -ENOMEM;
|
||||
goto err_priv;
|
||||
|
@ -285,7 +283,7 @@ static int alpine_msix_init(struct device_node *node,
|
|||
return 0;
|
||||
|
||||
err_map:
|
||||
kfree(priv->msi_map);
|
||||
bitmap_free(priv->msi_map);
|
||||
err_priv:
|
||||
kfree(priv);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue