summaryrefslogtreecommitdiff
path: root/rust/helpers
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-01-08 12:35:57 +0300
committerChun-Kuang Hu <chunkuang.hu@kernel.org>2025-03-13 02:17:22 +0300
commitdcb166ee43c3d594e7b73a24f6e8cf5663eeff2c (patch)
tree8e08af8ee5966ae8d68392e786797aee701a217a /rust/helpers
parentcd5b6ba77705e633955fa38eb6559cc7fe484a3b (diff)
downloadlinux-dcb166ee43c3d594e7b73a24f6e8cf5663eeff2c.tar.xz
drm/mediatek: dsi: fix error codes in mtk_dsi_host_transfer()
There is a type bug because the return statement: return ret < 0 ? ret : recv_cnt; The issue is that ret is an int, recv_cnt is a u32 and the function returns ssize_t, which is a signed long. The way that the type promotion works is that the negative error codes are first cast to u32 and then to signed long. The error codes end up being positive instead of negative and the callers treat them as success. Fixes: 81cc7e51c4f1 ("drm/mediatek: Allow commands to be sent during video mode") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202412210801.iADw0oIH-lkp@intel.com/ Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/b754a408-4f39-4e37-b52d-7706c132e27f@stanley.mountain/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions