diff options
author | Bo-Chen Chen <rex-bc.chen@mediatek.com> | 2022-09-01 12:41:46 +0800 |
---|---|---|
committer | Dmitry Osipenko <dmitry.osipenko@collabora.com> | 2022-09-04 15:32:30 +0300 |
commit | 86e77a1f0ae83381796d6b83f5cb33d9c6dcf6e7 (patch) | |
tree | 6b23cf196bd0c1bda04c4b53555b068afafa5824 /drivers/gpu/drm/mediatek/mtk_dp.c | |
parent | 16075ed148833d7c4feb13bb295bbcb87a7f321e (diff) | |
download | lwn-86e77a1f0ae83381796d6b83f5cb33d9c6dcf6e7.tar.gz lwn-86e77a1f0ae83381796d6b83f5cb33d9c6dcf6e7.zip |
drm/mediatek: dp: Determine device of next_bridge
It's not necessary to have a next_bridge for DP device, so we add this
patch to judge this.
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220901044149.16782-8-rex-bc.chen@mediatek.com
Diffstat (limited to 'drivers/gpu/drm/mediatek/mtk_dp.c')
-rw-r--r-- | drivers/gpu/drm/mediatek/mtk_dp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c index 136e13150281..e37c9185e4ec 100644 --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -1886,7 +1886,10 @@ static int mtk_dp_probe(struct platform_device *pdev) "failed to request dp irq resource\n"); mtk_dp->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); - if (IS_ERR(mtk_dp->next_bridge)) + if (IS_ERR(mtk_dp->next_bridge) && + PTR_ERR(mtk_dp->next_bridge) == -ENODEV) + mtk_dp->next_bridge = NULL; + else if (IS_ERR(mtk_dp->next_bridge)) return dev_err_probe(dev, PTR_ERR(mtk_dp->next_bridge), "Failed to get bridge\n"); |