Commit 6e4c9688 authored by Bo-Chen Chen's avatar Bo-Chen Chen Committed by Dmitry Osipenko

drm/mediatek: dp: Reduce indentation in mtk_dp_bdg_detect()

In order to improve human readability, reduce the indentation by
returning early if the dp/edp cable is not plugged in.
Signed-off-by: default avatarBo-Chen Chen <rex-bc.chen@mediatek.com>
Acked-by: default avatarChun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220916133821.27980-2-rex-bc.chen@mediatek.com
parent c989a624
......@@ -1933,7 +1933,9 @@ static enum drm_connector_status mtk_dp_bdg_detect(struct drm_bridge *bridge)
bool enabled = mtk_dp->enabled;
u8 sink_count = 0;
if (mtk_dp->train_info.cable_plugged_in) {
if (!mtk_dp->train_info.cable_plugged_in)
return ret;
if (!enabled) {
/* power on aux */
mtk_dp_update_bits(mtk_dp, MTK_DP_TOP_PWR_STATE,
......@@ -1965,7 +1967,7 @@ static enum drm_connector_status mtk_dp_bdg_detect(struct drm_bridge *bridge)
DP_PWR_STATE_BANDGAP_TPLL,
DP_PWR_STATE_MASK);
}
}
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment