提交 2c7f2f20 编写于 作者: M Markus Elfring 提交者: Vinod Koul

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: NMarkus Elfring <elfring@users.sourceforge.net>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
上级 cf80ecf7
......@@ -3414,10 +3414,8 @@ static int __init d40_lcla_allocate(struct d40_base *base)
page_list = kmalloc_array(MAX_LCLA_ALLOC_ATTEMPTS,
sizeof(*page_list),
GFP_KERNEL);
if (!page_list) {
ret = -ENOMEM;
goto failure;
}
if (!page_list)
return -ENOMEM;
/* Calculating how many pages that are required */
base->lcla_pool.pages = SZ_1K * base->num_phy_chans / PAGE_SIZE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册