summaryrefslogtreecommitdiff
path: root/drivers/media/platform/ti
diff options
context:
space:
mode:
authorJiasheng Jiang <jiasheng@iscas.ac.cn>2023-01-04 09:55:37 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-01-22 09:26:33 +0100
commitda8e05f84a11c3cc3b0ba0a3c62d20e358002d99 (patch)
tree692602249ac3da4dcf4808a2589a9917d3a53b27 /drivers/media/platform/ti
parent0d828fd50c73d30da3c0d52a31c6f3ede2498020 (diff)
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: 448de7e7850b ("[media] omap3isp: OMAP3 ISP core") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/ti')
-rw-r--r--drivers/media/platform/ti/omap3isp/isp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c
index 1d40bb59ff81..e7327e38482d 100644
--- a/drivers/media/platform/ti/omap3isp/isp.c
+++ b/drivers/media/platform/ti/omap3isp/isp.c
@@ -2307,7 +2307,16 @@ static int isp_probe(struct platform_device *pdev)
/* Regulators */
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");
+ if (IS_ERR(isp->isp_csiphy2.vdd)) {
+ ret = PTR_ERR(isp->isp_csiphy2.vdd);
+ goto error;
+ }
/* Clocks
*