media: imx-pxp: Fix ERR_PTR dereference in pxp_probe()
Subsystems (4)
This is an automatic generated email to let you know that the following patch were queued:
Subject: media: imx-pxp: Fix ERR_PTR dereference in pxp_probe() Author: Harshit Mogalapalli <[email protected]> Date: Tue May 14 02:50:38 2024 -0700
devm_regmap_init_mmio() can fail, add a check and bail out in case of error.
Fixes 4e5bd3fdbeb3 ("media: imx-pxp: convert to regmap")
Signed-off-by Harshit Mogalapalli <[email protected]>
Reviewed-by Laurent Pinchart <[email protected]>
Signed-off-by Laurent Pinchart <[email protected]>
drivers/media/platform/nxp/imx-pxp.c | 3 +++ 1 file changed, 3 insertions(+)
---
drivers/media/platform/nxp/imx-pxp.c +3 -0
@@ -1805,6 +1805,9 @@ static int pxp_probe(struct platform_device *pdev)return PTR_ERR (mmio); dev->regmap =devm_regmap_init_mmio (&pdev->dev, mmio, &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 );if (irq <0 )