diff options
author | Pin-Yen Lin <treapking@chromium.org> | 2022-02-10 18:38:27 +0800 |
---|---|---|
committer | Robert Foss <robert.foss@linaro.org> | 2022-02-14 16:21:59 +0100 |
commit | d5c6f647aec9ed524aedd04a3aec5ebc21d39007 (patch) | |
tree | 437d483280fbe6dcff6264a0e238059a5b110e19 /drivers/gpu | |
parent | 7db47b838896ec2bb57e3d0b329804b84f32626c (diff) | |
download | linux-stable-d5c6f647aec9ed524aedd04a3aec5ebc21d39007.tar.gz linux-stable-d5c6f647aec9ed524aedd04a3aec5ebc21d39007.tar.bz2 linux-stable-d5c6f647aec9ed524aedd04a3aec5ebc21d39007.zip |
drm/bridge: anx7625: Fix overflow issue on reading EDID
The length of EDID block can be longer than 256 bytes, so we should use
`int` instead of `u8` for the `edid_pos` variable.
Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
Signed-off-by: Pin-Yen Lin <treapking@chromium.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220210103827.402436-1-treapking@chromium.org
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/bridge/analogix/anx7625.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index a59a4f4d2c5b..633618bafd75 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1109,7 +1109,8 @@ static int segments_edid_read(struct anx7625_data *ctx, static int sp_tx_edid_read(struct anx7625_data *ctx, u8 *pedid_blocks_buf) { - u8 offset, edid_pos; + u8 offset; + int edid_pos; int count, blocks_num; u8 pblock_buf[MAX_DPCD_BUFFER_SIZE]; u8 i, j; |