Re: [PATCH 3/3] drm/msm/dsi: fix signedness bug in msm_dsi_host_cmd_rx()

2021-10-03 Thread Dan Carpenter
On Sat, Oct 02, 2021 at 01:59:56AM +0300, Dmitry Baryshkov wrote: > On 01/10/2021 15:36, Dan Carpenter wrote: > > The "msg->tx_len" variable is type size_t so if dsi_cmds2buf_tx() > > returns a negative error code that it type promoted to a high positive > > value and treat as a success. The secon

Re: [PATCH 3/3] drm/msm/dsi: fix signedness bug in msm_dsi_host_cmd_rx()

2021-10-03 Thread Dan Carpenter
On Sat, Oct 02, 2021 at 01:59:56AM +0300, Dmitry Baryshkov wrote: > On 01/10/2021 15:36, Dan Carpenter wrote: > > The "msg->tx_len" variable is type size_t so if dsi_cmds2buf_tx() > > returns a negative error code that it type promoted to a high positive > > value and treat as a success. The secon

Re: [PATCH 3/3] drm/msm/dsi: fix signedness bug in msm_dsi_host_cmd_rx()

2021-10-01 Thread Dmitry Baryshkov
On 01/10/2021 15:36, Dan Carpenter wrote: The "msg->tx_len" variable is type size_t so if dsi_cmds2buf_tx() returns a negative error code that it type promoted to a high positive value and treat as a success. The second problem with this code is that it can return meaningless positive values on

[PATCH 3/3] drm/msm/dsi: fix signedness bug in msm_dsi_host_cmd_rx()

2021-10-01 Thread Dan Carpenter
The "msg->tx_len" variable is type size_t so if dsi_cmds2buf_tx() returns a negative error code that it type promoted to a high positive value and treat as a success. The second problem with this code is that it can return meaningless positive values on error. Fixes: a689554ba6ed ("drm/msm: Initi