Skip to content

Commit b90b523

Browse files
Sergey Shtylyovgregkh
authored andcommitted
drm/rockchip: cdn-dp: add missing check in cdn_dp_config_video()
commit 46c31e1 upstream. The result of cdn_dp_reg_write() is checked everywhere (with the error being logged by the callers) except one place in cdn_dp_config_video(). Add the missing result check, bailing out early on error... Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool. Fixes: 1a0f7ed ("drm/rockchip: cdn-dp: add cdn DP support for rk3399") Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev> Cc: stable@vger.kernel.org Reviewed-by: Chaoyi Chen <chaoyi.chen@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patch.msgid.link/adf6b313-f7db-4d8f-9000-8c65446ba041@auroraos.dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c82c002 commit b90b523

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpu/drm/rockchip/cdn-dp-reg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,8 @@ int cdn_dp_config_video(struct cdn_dp_device *dp)
683683
val = div_u64(8 * (symbol + 1), bit_per_pix) - val;
684684
val += 2;
685685
ret = cdn_dp_reg_write(dp, DP_VC_TABLE(15), val);
686+
if (ret)
687+
goto err_config_video;
686688

687689
switch (video->color_depth) {
688690
case 6:

0 commit comments

Comments
 (0)