[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHwB_NK3Jg=7VC6dMgB3LuVCu2ZxWu_MO8PGWcoXpG=JnqzORg@mail.gmail.com>
Date: Fri, 23 Aug 2024 19:53:50 +0800
From: cong yang <yangcong5@...qin.corp-partner.google.com>
To: Charles Han <hanchunchao@...pur.com>
Cc: neil.armstrong@...aro.org, quic_jesszhan@...cinc.com,
maarten.lankhorst@...ux.intel.com, mripard@...nel.org, tzimmermann@...e.de,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
liuyanming@...system.com, Douglas Anderson <dianders@...omium.org>
Subject: Re: [PATCH v2 1/1] drm/panel: fix null pointer dereference in hx83102_get_modes
Hi,
Charles Han <hanchunchao@...pur.com> 于2024年8月23日周五 16:37写道:
>
> In hx83102_get_modes(), the return value of drm_mode_duplicate() is
> assigned to mode, which will lead to a possible NULL pointer
> dereference on failure of drm_mode_duplicate(). Add a check to avoid
> npd.
>
> Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver")
> Signed-off-by: Charles Han <hanchunchao@...pur.com>
> ---
> drivers/gpu/drm/panel/panel-himax-hx83102.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-himax-hx83102.c b/drivers/gpu/drm/panel/panel-himax-hx83102.c
> index 7c2a5e9b7fb3..e61ed7d02729 100644
> --- a/drivers/gpu/drm/panel/panel-himax-hx83102.c
> +++ b/drivers/gpu/drm/panel/panel-himax-hx83102.c
> @@ -566,7 +566,6 @@ static int hx83102_get_modes(struct drm_panel *panel,
>
> mode = drm_mode_duplicate(connector->dev, m);
> if (!mode) {
> - dev_err(&ctx->dsi->dev, "bad mode or failed to add mode\n");
Your V2 patch should not depend V1, should make patches on the base code.
And when you send the next release, explain the differences from the previous
submission in a cover letter or a single patch.
see https://www.kernel.org/doc/html/latest/process/submitting-patches.html#respond-to-review-comments
In addition, Doug made some comments in V1, you should CC him when
sending patches.
> return -EINVAL;
> }
nit: remove brackets
>
> --
> 2.31.1
>
Powered by blists - more mailing lists