Skip to content

Commit

Permalink
irqchip/loongson-pch-ms: Use bitmap_free() to free bitmap
Browse files Browse the repository at this point in the history
kfree() and bitmap_free() are the same. But using the latter is more
consistent when freeing memory allocated with bitmap_zalloc().

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/0b982ab54844803049c217b2899baa59602faacd.1640529916.git.christophe.jaillet@wanadoo.fr
  • Loading branch information
Christophe JAILLET authored and Marc Zyngier committed Jan 17, 2022
1 parent 960dd88 commit c831d92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/irqchip/irq-loongson-pch-msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static int pch_msi_init(struct device_node *node,
return 0;

err_map:
kfree(priv->msi_map);
bitmap_free(priv->msi_map);
err_priv:
kfree(priv);
return ret;
Expand Down

0 comments on commit c831d92

Please sign in to comment.