Message ID | ee94dee5-d88e-e42d-abc3-4e5a7727b561@users.sourceforge.net (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 73203ac..fbebeff 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3409,9 +3409,9 @@ static int __init d40_lcla_allocate(struct d40_base *base) * To full fill this hardware requirement without wasting 256 kb * we allocate pages until we get an aligned one. */ - page_list = kmalloc(sizeof(unsigned long) * MAX_LCLA_ALLOC_ATTEMPTS, - GFP_KERNEL); - + page_list = kmalloc_array(MAX_LCLA_ALLOC_ATTEMPTS, + sizeof(*page_list), + GFP_KERNEL); if (!page_list) { ret = -ENOMEM; goto failure;