ste_dma40: Return directly after a failed kmalloc_array()
Return directly after a memory allocation failed in this function at the beginning. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
cf80ecf7a2
commit
2c7f2f20da
|
@ -3414,10 +3414,8 @@ static int __init d40_lcla_allocate(struct d40_base *base)
|
||||||
page_list = kmalloc_array(MAX_LCLA_ALLOC_ATTEMPTS,
|
page_list = kmalloc_array(MAX_LCLA_ALLOC_ATTEMPTS,
|
||||||
sizeof(*page_list),
|
sizeof(*page_list),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!page_list) {
|
if (!page_list)
|
||||||
ret = -ENOMEM;
|
return -ENOMEM;
|
||||||
goto failure;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Calculating how many pages that are required */
|
/* Calculating how many pages that are required */
|
||||||
base->lcla_pool.pages = SZ_1K * base->num_phy_chans / PAGE_SIZE;
|
base->lcla_pool.pages = SZ_1K * base->num_phy_chans / PAGE_SIZE;
|
||||||
|
|
Loading…
Reference in New Issue