提交 7d87db3d 编写于 作者: L Lad, Prabhakar 提交者: Mauro Carvalho Chehab

[media] media: am437x-vpfe: return error in case memory allocation failure

return error in case devm_kzalloc() fails.
Signed-off-by: NLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 d3723239
...@@ -2501,6 +2501,12 @@ vpfe_get_pdata(struct platform_device *pdev) ...@@ -2501,6 +2501,12 @@ vpfe_get_pdata(struct platform_device *pdev)
pdata->asd[i] = devm_kzalloc(&pdev->dev, pdata->asd[i] = devm_kzalloc(&pdev->dev,
sizeof(struct v4l2_async_subdev), sizeof(struct v4l2_async_subdev),
GFP_KERNEL); GFP_KERNEL);
if (!pdata->asd[i]) {
of_node_put(rem);
pdata = NULL;
goto done;
}
pdata->asd[i]->match_type = V4L2_ASYNC_MATCH_OF; pdata->asd[i]->match_type = V4L2_ASYNC_MATCH_OF;
pdata->asd[i]->match.of.node = rem; pdata->asd[i]->match.of.node = rem;
of_node_put(endpoint); of_node_put(endpoint);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册