drm/msm/dsi: fix error checks and return values for DSI xmit functions
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 1 Apr 2022 23:11:04 +0000 (02:11 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sun, 1 May 2022 23:39:34 +0000 (02:39 +0300)
commitf0e7e9ed379c012c4d6b09a09b868accc426223c
tree181b9b021ed3118d0469f958d73e6c63ad3c7786
parent2788b4efa60c1e03ac10a156f3fdbd3be0f9198c
drm/msm/dsi: fix error checks and return values for DSI xmit functions

As noticed by Dan ([1] an the followup thread) there are multiple issues
with the return values for MSM DSI command transmission callback. In
the error case it can easily return a positive value when it should
have returned a proper error code.

This commits attempts to fix these issues both in TX and in RX paths.

[1]: https://lore.kernel.org/linux-arm-msm/20211001123617.GH2283@kili/

Fixes: a689554ba6ed ("drm/msm: Initial add DSI connector support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Tested-by: Marijn Suijten <marijn.suijten@somainline.org>
Patchwork: https://patchwork.freedesktop.org/patch/480501/
Link: https://lore.kernel.org/r/20220401231104.967193-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/dsi/dsi_host.c