Commit 478a2db8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Marc Zyngier

irqchip/irq-mvebu-gicp: Allocate enough memory for spi_bitmap

BITS_TO_LONGS() gives us the number of longs we need, but we want to
allocate the number of bytes.

Fixes: a68a63cb ("irqchip/irq-mvebu-gicp: Add new driver for Marvell GICP")
Acked-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 866d7c1b
......@@ -226,7 +226,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
}
gicp->spi_bitmap = devm_kzalloc(&pdev->dev,
BITS_TO_LONGS(gicp->spi_cnt),
BITS_TO_LONGS(gicp->spi_cnt) * sizeof(long),
GFP_KERNEL);
if (!gicp->spi_bitmap)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment