From: Liviu Dudau <liviu@dudau.co.uk>
To: Haoxiang Li <haoxiang_li2024@163.com>
Cc: liviu.dudau@arm.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
simona@ffwll.ch, james.qian.wang@arm.com, ayan.halder@arm.com,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH RESEND] drm/komeda: Add check for komeda_get_layer_fourcc_list()
Date: Wed, 22 Jan 2025 11:28:54 +0000 [thread overview]
Message-ID: <Z5DWdtxrYjfIt+/F@bart.dudau.co.uk> (raw)
In-Reply-To: <20241219090256.146424-1-haoxiang_li2024@163.com>
Hi Haoxiang,
For reasons that I have not uncovered yet, the work email servers never
delivered your message, I have discovered it today accidentally while
looking in a backup I have at home.
On Thu, Dec 19, 2024 at 05:02:56PM +0800, Haoxiang Li wrote:
> Add check for the return value of komeda_get_layer_fourcc_list()
> to catch the potential exception.
>
> Fixes: 5d51f6c0da1b ("drm/komeda: Add writeback support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Best regards,
Liviu
> ---
> drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c
> index ebccb74306a7..f30b3d5eeca5 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_wb_connector.c
> @@ -160,6 +160,10 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms,
> formats = komeda_get_layer_fourcc_list(&mdev->fmt_tbl,
> kwb_conn->wb_layer->layer_type,
> &n_formats);
> + if (!formats) {
> + kfree(kwb_conn);
> + return -ENOMEM;
> + }
>
> err = drm_writeback_connector_init(&kms->base, wb_conn,
> &komeda_wb_connector_funcs,
> --
> 2.25.1
>
--
Everyone who uses computers frequently has had, from time to time,
a mad desire to attack the precocious abacus with an axe.
-- John D. Clark, Ignition!
prev parent reply other threads:[~2025-01-22 11:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 9:02 [PATCH RESEND] drm/komeda: Add check for komeda_get_layer_fourcc_list() Haoxiang Li
2025-01-22 11:28 ` Liviu Dudau [this message]
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=Z5DWdtxrYjfIt+/F@bart.dudau.co.uk \
--to=liviu@dudau.co.uk \
--cc=airlied@gmail.com \
--cc=ayan.halder@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=haoxiang_li2024@163.com \
--cc=james.qian.wang@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.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