mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
drm/imx: parallel-display: check return value of devm_drm_bridge_add() in imx_pd_probe()
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: bf7e97910b ("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>
This commit is contained in:
parent
7be41fb00e
commit
c5f8658f97
|
|
@ -256,7 +256,9 @@ static int imx_pd_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, imxpd);
|
||||
|
||||
devm_drm_bridge_add(dev, &imxpd->bridge);
|
||||
ret = devm_drm_bridge_add(dev, &imxpd->bridge);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return component_add(dev, &imx_pd_ops);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user