]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/panel: novatek-nt35560: Fix invalid return value
authorBrigham Campbell <me@brighamcampbell.com>
Thu, 31 Jul 2025 03:23:41 +0000 (21:23 -0600)
committerNeil Armstrong <neil.armstrong@linaro.org>
Mon, 4 Aug 2025 15:29:38 +0000 (17:29 +0200)
commit125459e19ec654924e472f3ff5aeea40358dbebf
treefdb6872215e4e54bda074049d49a77c4b98d31e7
parentfdb4e289d2d6fd172591d802db71cef3134c1cf8
drm/panel: novatek-nt35560: Fix invalid return value

Fix bug in nt35560_set_brightness() which causes the function to
erroneously report an error. mipi_dsi_dcs_write() returns either a
negative value when an error occurred or a positive number of bytes
written when no error occurred. The buggy code reports an error under
either condition.

Fixes: 8152c2bfd780 ("drm/panel: Add driver for Sony ACX424AKP panel")
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250731032343.1258366-2-me@brighamcampbell.com
drivers/gpu/drm/panel/panel-novatek-nt35560.c