[PATCH] drm/mediatek: dsi: fix error codes in mtk_dsi_host_transfer()

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Wed Mar 1 01:58:18 PST 2023


Il 27/02/23 11:08, Dan Carpenter ha scritto:
> There is a type bug because the return statement:
> 
> 	return ret < 0 ? ret : recv_cnt;
> 
> will not return negatives on 64bit systems.  The problem is that the
> function returns ssize_t types, while "ret" is int and "recv_cnt" is a
> u32.  The negative values are type promoted to u32 and returned as
> positive values instead of negative error codes.
> 
> Fixes: 81cc7e51c4f1 ("drm/mediatek: Allow commands to be sent during video mode")
> Signed-off-by: Dan Carpenter <error27 at gmail.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>





More information about the Linux-mediatek mailing list