Commit da8e05f8 authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by Mauro Carvalho Chehab

media: platform: ti: Add missing check for devm_regulator_get

Add check for the return value of devm_regulator_get since it may return
error pointer.

Fixes: 448de7e7 ("[media] omap3isp: OMAP3 ISP core")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 0d828fd5
...@@ -2307,7 +2307,16 @@ static int isp_probe(struct platform_device *pdev) ...@@ -2307,7 +2307,16 @@ static int isp_probe(struct platform_device *pdev)
/* Regulators */ /* Regulators */
isp->isp_csiphy1.vdd = devm_regulator_get(&pdev->dev, "vdd-csiphy1"); isp->isp_csiphy1.vdd = devm_regulator_get(&pdev->dev, "vdd-csiphy1");
if (IS_ERR(isp->isp_csiphy1.vdd)) {
ret = PTR_ERR(isp->isp_csiphy1.vdd);
goto error;
}
isp->isp_csiphy2.vdd = devm_regulator_get(&pdev->dev, "vdd-csiphy2"); isp->isp_csiphy2.vdd = devm_regulator_get(&pdev->dev, "vdd-csiphy2");
if (IS_ERR(isp->isp_csiphy2.vdd)) {
ret = PTR_ERR(isp->isp_csiphy2.vdd);
goto error;
}
/* Clocks /* Clocks
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment