mirror of https://gitee.com/openkylin/linux.git
[media] media: am437x-vpfe: return error in case memory allocation failure
return error in case devm_kzalloc() fails. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
d37232390f
commit
7d87db3df0
|
@ -2501,6 +2501,12 @@ vpfe_get_pdata(struct platform_device *pdev)
|
|||
pdata->asd[i] = devm_kzalloc(&pdev->dev,
|
||||
sizeof(struct v4l2_async_subdev),
|
||||
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.of.node = rem;
|
||||
of_node_put(endpoint);
|
||||
|
|
Loading…
Reference in New Issue