drm/bridge: synopsys: dw-dp: fix bool function returning negative error code
Subsystems (4)
PATCH 1/1 drm/bridge: synopsys: dw-dp: fix bool function returning negative error code
From: yanlonglong <[email protected]>
The function dw_dp_video_need_vsc_sdp() is declared to return bool, but it returns -EINVAL when dw_dp_get_bridge_state() fails. Since -EINVAL is a non-zero value (-22), it is implicitly converted to true, which is the opposite of the intended behavior
Fixes 86eecc3a9c2e("drm/bridge: synopsys: Add DW DPTX Controller support library")
Signed-off-by yanlonglong <[email protected]>
--- drivers/gpu/drm/bridge/synopsys/dw-dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/synopsys/dw-dp.c +1 -1
@@ -1143,7 +1143,7 @@ static bool dw_dp_video_need_vsc_sdp(struct dw_dp *dp) state =dw_dp_get_bridge_state (dp);if (!state) -return -EINVAL ; +return false;if (!link->vsc_sdp_supported)return false;
Signature · 1 line
2.43.0