mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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: 448de7e785
("[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>
This commit is contained in:
parent
0d828fd50c
commit
da8e05f84a
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue