From: Robert Foss Date: Wed, 18 Aug 2021 17:13:18 +0000 (+0200) Subject: drm/bridge: anx7625: Propagate errors from sp_tx_edid_read() X-Git-Tag: v5.16-rc1~140^2~15^2~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a23e0a2a222a56fbd001a37c19b16efdf97ae017;p=thirdparty%2Fkernel%2Flinux.git drm/bridge: anx7625: Propagate errors from sp_tx_edid_read() During the sp_tx_edid_read() call the return value of sp_tx_edid_read() is ignored, which could cause potential errors to go unhandled. All errors which are returned by sp_tx_edid_read() are handled in anx7625_get_edid(). Reviewed-by: Sam Ravnborg Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210818171318.1848272-2-robert.foss@linaro.org --- diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index ea414cd349b5c..abc8db77bfd36 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -845,8 +845,11 @@ static int sp_tx_edid_read(struct anx7625_data *ctx, if (g_edid_break == 1) break; - segments_edid_read(ctx, count / 2, - pblock_buf, offset); + ret = segments_edid_read(ctx, count / 2, + pblock_buf, offset); + if (ret < 0) + return ret; + memcpy(&pedid_blocks_buf[edid_pos], pblock_buf, MAX_DPCD_BUFFER_SIZE); @@ -863,8 +866,11 @@ static int sp_tx_edid_read(struct anx7625_data *ctx, if (g_edid_break == 1) break; - segments_edid_read(ctx, count / 2, - pblock_buf, offset); + ret = segments_edid_read(ctx, count / 2, + pblock_buf, offset); + if (ret < 0) + return ret; + memcpy(&pedid_blocks_buf[edid_pos], pblock_buf, MAX_DPCD_BUFFER_SIZE);