Skip to content

Commit ac214b1

Browse files
Chen NiSasha Levin
authored andcommitted
drm/imx: parallel-display: check return value of devm_drm_bridge_add() in imx_pd_probe()
[ Upstream commit c5f8658 ] Return the value of devm_drm_bridge_add() in order to propagate the error properly, if it fails due to resource allocation failure or bridge registration failure. This ensures that the probe function fails safely rather than proceeding with a potentially incomplete bridge setup. Fixes: bf7e979 ("drm/imx: parallel-display: add the bridge before attaching it") Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20260204090629.2209542-1-nichen@iscas.ac.cn Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 700c13a commit ac214b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/imx/ipuv3/parallel-display.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ static int imx_pd_probe(struct platform_device *pdev)
256256

257257
platform_set_drvdata(pdev, imxpd);
258258

259-
devm_drm_bridge_add(dev, &imxpd->bridge);
259+
ret = devm_drm_bridge_add(dev, &imxpd->bridge);
260+
if (ret)
261+
return ret;
260262

261263
return component_add(dev, &imx_pd_ops);
262264
}

0 commit comments

Comments
 (0)