Skip to content

Commit

Permalink
drm/bridge: anx7625: Fix edid_read break case in sp_tx_edid_read()
Browse files Browse the repository at this point in the history
edid_read() was assumed to return 0 on success. After commit
7f16d0f("drm/bridge: anx7625: Propagate errors from sp_tx_rst_aux()"),
the function will return > 0 for successful case, representing the i2c
read bytes. Otherwise -EIO on failure cases. Update the g_edid_break
break condition accordingly.

Fixes: 7f16d0f("drm/bridge: anx7625: Propagate errors from sp_tx_rst_aux()")
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Xin Ji <xji@analogixsemi.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211118193002.407168-1-hsinyi@chromium.org
  • Loading branch information
hsinyi527 authored and robertfoss committed Nov 24, 2021
1 parent 7057474 commit 0bae568
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/bridge/analogix/anx7625.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ static int sp_tx_edid_read(struct anx7625_data *ctx,
int count, blocks_num;
u8 pblock_buf[MAX_DPCD_BUFFER_SIZE];
u8 i, j;
u8 g_edid_break = 0;
int g_edid_break = 0;
int ret;
struct device *dev = &ctx->client->dev;

Expand Down Expand Up @@ -881,7 +881,7 @@ static int sp_tx_edid_read(struct anx7625_data *ctx,
g_edid_break = edid_read(ctx, offset,
pblock_buf);

if (g_edid_break)
if (g_edid_break < 0)
break;

memcpy(&pedid_blocks_buf[offset],
Expand Down

0 comments on commit 0bae568

Please sign in to comment.