mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-12 20:35:23 +02:00
media: imx-pxp: Fix ERR_PTR dereference in pxp_probe()
commit57e9ce68ae
upstream. devm_regmap_init_mmio() can fail, add a check and bail out in case of error. Fixes:4e5bd3fdbe
("media: imx-pxp: convert to regmap") Cc: stable@vger.kernel.org Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20240514095038.3464191-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
787b7348ad
commit
358bc85269
|
@ -1805,6 +1805,9 @@ static int pxp_probe(struct platform_device *pdev)
|
||||||
return PTR_ERR(mmio);
|
return PTR_ERR(mmio);
|
||||||
dev->regmap = devm_regmap_init_mmio(&pdev->dev, mmio,
|
dev->regmap = devm_regmap_init_mmio(&pdev->dev, mmio,
|
||||||
&pxp_regmap_config);
|
&pxp_regmap_config);
|
||||||
|
if (IS_ERR(dev->regmap))
|
||||||
|
return dev_err_probe(&pdev->dev, PTR_ERR(dev->regmap),
|
||||||
|
"Failed to init regmap\n");
|
||||||
|
|
||||||
irq = platform_get_irq(pdev, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (irq < 0)
|
if (irq < 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user