5.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lucas Stach l.stach@pengutronix.de
commit e82290a2e0e8ec5e836ecad1ca025021b3855c2d upstream.
Address only transactions without any data are valid and should not be flagged as short transactions. Simply return the message size when no transaction errors occured.
CC: stable@vger.kernel.org Signed-off-by: Lucas Stach l.stach@pengutronix.de Reviewed-by: Robert Foss rfoss@kernel.org Signed-off-by: Robert Foss rfoss@kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20240318203925.2837689-1-l.sta... Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c @@ -1115,7 +1115,6 @@ ssize_t analogix_dp_transfer(struct anal u32 status_reg; u8 *buffer = msg->buffer; unsigned int i; - int num_transferred = 0; int ret;
/* Buffer size of AUX CH is 16 bytes */ @@ -1167,7 +1166,6 @@ ssize_t analogix_dp_transfer(struct anal reg = buffer[i]; writel(reg, dp->reg_base + ANALOGIX_DP_BUF_DATA_0 + 4 * i); - num_transferred++; } }
@@ -1215,7 +1213,6 @@ ssize_t analogix_dp_transfer(struct anal reg = readl(dp->reg_base + ANALOGIX_DP_BUF_DATA_0 + 4 * i); buffer[i] = (unsigned char)reg; - num_transferred++; } }
@@ -1232,7 +1229,7 @@ ssize_t analogix_dp_transfer(struct anal (msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_NATIVE_READ) msg->reply = DP_AUX_NATIVE_REPLY_ACK;
- return num_transferred > 0 ? num_transferred : -EBUSY; + return msg->size;
aux_error: /* if aux err happen, reset aux */