drm/dsi: Fix improper use of mipi_dsi_device_transfer() return value
authorPhilippe Cornu <philippe.cornu@st.com>
Fri, 12 Jan 2018 14:48:47 +0000 (15:48 +0100)
committerSean Paul <seanpaul@chromium.org>
Tue, 16 Jan 2018 22:10:14 +0000 (17:10 -0500)
commit6ac69290289821b80c2fcf9e3f2c137346c4239f
treec7d096ee40a05879a7e72308270570ca2523b54f
parentfd2cb71bbc383edbfe73ce3770569c7259cfb939
drm/dsi: Fix improper use of mipi_dsi_device_transfer() return value

The function mipi_dsi_device_transfer() returns the number of transmitted
or received bytes on success or a negative error code on failure.

The functions mipi_dsi_shutdown_peripheral(), mipi_dsi_turn_on_peripheral() &
mipi_dsi_set_maximum_return_packet_size() use improperly this returned
value in case of success: 0 should be returned instead of the number of
transmitted bytes.

Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180112144847.18810-1-philippe.cornu@st.com
drivers/gpu/drm/drm_mipi_dsi.c