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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux