From: neil.armstrong@linaro.org
To: Chen Ni <nichen@iscas.ac.cn>, jesszhan0024@gmail.com
Cc: dmitry.baryshkov@oss.qualcomm.com, linusw@kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/panel: focaltech-ota7290b: Fix error check for devm_drm_panel_alloc()
Date: Thu, 30 Apr 2026 11:45:47 +0200 [thread overview]
Message-ID: <641cafb2-21cd-4918-8489-713f307c3d0a@linaro.org> (raw)
In-Reply-To: <20260429080527.1456732-1-nichen@iscas.ac.cn>
On 4/29/26 10:05, Chen Ni wrote:
> The devm_drm_panel_alloc() function returns an error pointer on failure,
> not NULL. Fix the check to use IS_ERR() and return PTR_ERR() to
> correctly handle allocation failures.
>
> Fixes: 07853e954248 ("drm/panel: add driver for Waveshare 8.8" DSI TOUCH-A panel")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> drivers/gpu/drm/panel/panel-focaltech-ota7290b.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-focaltech-ota7290b.c b/drivers/gpu/drm/panel/panel-focaltech-ota7290b.c
> index dd420bb19440..ed02a8daf96f 100644
> --- a/drivers/gpu/drm/panel/panel-focaltech-ota7290b.c
> +++ b/drivers/gpu/drm/panel/panel-focaltech-ota7290b.c
> @@ -156,8 +156,8 @@ static int ota7290b_probe(struct mipi_dsi_device *dsi)
> ctx = devm_drm_panel_alloc(&dsi->dev, struct ota7290b, panel,
> &ota7290b_funcs,
> DRM_MODE_CONNECTOR_DSI);
> - if (!ctx)
> - return -ENOMEM;
> + if (IS_ERR(ctx))
> + return PTR_ERR(ctx);
> mipi_dsi_set_drvdata(dsi, ctx);
> ctx->dsi = dsi;
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
next prev parent reply other threads:[~2026-04-30 9:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 8:05 [PATCH] drm/panel: focaltech-ota7290b: Fix error check for devm_drm_panel_alloc() Chen Ni
2026-04-30 9:45 ` neil.armstrong [this message]
2026-05-05 1:48 ` Claude review: " Claude Code Review Bot
2026-05-05 1:48 ` Claude Code Review Bot
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=641cafb2-21cd-4918-8489-713f307c3d0a@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=linusw@kernel.org \
--cc=nichen@iscas.ac.cn \
/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