mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Avi Weiss <thnkslprpt@gmail.com>, Inki Dae <inki.dae@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	dri-devel@lists.freedesktop.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Avi Weiss <thnkslprpt@gmail.com>
Subject: Re: [PATCH] drm/exynos: hdmi: free EDID on connector update failure
Date: Mon, 19 Oct 2026 16:32:14 +0300	[thread overview]
Message-ID: <e22eadd0ada0c8243cfdf7829580984fdf897498@intel.com> (raw)
In-Reply-To: <20261012064334.3193085-1-thnkslprpt@gmail.com>

On Mon, 12 Oct 2026, Avi Weiss <thnkslprpt@gmail.com> wrote:
> If drm_edid_connector_update() fails, hdmi_get_modes() returns
> without freeing the EDID allocated by drm_edid_read_ddc(). It's
> an unlikely error path but nevertheless possible and should be
> cleaned up fully.
>
> Free the EDID before returning, while keeping the existing return
> value of 0.
>
> Fixes: f6e4f57fd90dc ("drm/exynos: hdmi: convert to struct drm_edid")
> Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index d4fce39c2b61..386557a7f5e8 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -893,8 +893,10 @@ static int hdmi_get_modes(struct drm_connector *connector)
>  	drm_edid = drm_edid_read_ddc(connector, hdata->ddc_adpt);
>  
>  	ret = drm_edid_connector_update(connector, drm_edid);

You could just move the drm_edid_free() call here to avoid duplicating
it.

> -	if (ret)
> +	if (ret) {
> +		drm_edid_free(drm_edid);
>  		return 0;
> +	}
>  
>  	cec_notifier_set_phys_addr(hdata->notifier, info->source_physical_address);
>  
>
> base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-10-19 13:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12  6:43 Avi Weiss
2026-10-19 13:32 ` Jani Nikula [this message]
2026-10-20  5:10   ` Avi Weiss

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=e22eadd0ada0c8243cfdf7829580984fdf897498@intel.com \
    --to=jani.nikula@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sw0312.kim@samsung.com \
    --cc=thnkslprpt@gmail.com \
    /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

all inboxes | Powered by JetHome®