From: neil.armstrong@linaro.org
To: Brigham Campbell <me@brighamcampbell.com>,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch,
linus.walleij@linaro.org, jessica.zhang@oss.qualcomm.com,
sam@ravnborg.org
Cc: dianders@chromium.org, skhan@linuxfoundation.org,
linux-kernel-mentees@lists.linux.dev,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] drm/panel: novatek-nt35560: Fix invalid return value
Date: Tue, 29 Jul 2025 11:17:10 +0200 [thread overview]
Message-ID: <8cbbf5f8-84b4-43af-89b9-0ee4bc0a2591@linaro.org> (raw)
In-Reply-To: <20250729054435.1209156-2-me@brighamcampbell.com>
On 29/07/2025 07:44, Brigham Campbell wrote:
> 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: 7835ed6a9e86 ("drm/panel-sony-acx424akp: Modernize backlight handling")
> Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
> ---
> drivers/gpu/drm/panel/panel-novatek-nt35560.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35560.c b/drivers/gpu/drm/panel/panel-novatek-nt35560.c
> index 98f0782c8411..17898a29efe8 100644
> --- a/drivers/gpu/drm/panel/panel-novatek-nt35560.c
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt35560.c
> @@ -161,7 +161,7 @@ static int nt35560_set_brightness(struct backlight_device *bl)
> par = 0x00;
> ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY,
> &par, 1);
> - if (ret) {
> + if (ret < 0) {
> dev_err(nt->dev, "failed to disable display backlight (%d)\n", ret);
> return ret;
> }
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
next prev parent reply other threads:[~2025-07-29 9:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 5:44 [PATCH v2 0/3] drm/panel: novatek-nt35560: Fix bug and clean up Brigham Campbell
2025-07-29 5:44 ` [PATCH v2 1/3] drm/panel: novatek-nt35560: Fix invalid return value Brigham Campbell
2025-07-29 9:17 ` neil.armstrong [this message]
2025-07-29 21:33 ` Doug Anderson
2025-07-30 0:02 ` Brigham Campbell
2025-07-29 5:44 ` [PATCH v2 2/3] drm: Add MIPI support function and macros Brigham Campbell
2025-07-29 21:34 ` Doug Anderson
2025-07-30 0:15 ` Brigham Campbell
2025-07-29 5:44 ` [PATCH v2 3/3] drm/panel: novatek-nt35560: Clean up driver Brigham Campbell
2025-07-29 21:34 ` Doug Anderson
2025-07-29 17:49 ` [PATCH v2 0/3] drm/panel: novatek-nt35560: Fix bug and clean up Brigham Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8cbbf5f8-84b4-43af-89b9-0ee4bc0a2591@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=airlied@gmail.com \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jessica.zhang@oss.qualcomm.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=me@brighamcampbell.com \
--cc=mripard@kernel.org \
--cc=sam@ravnborg.org \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox