mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Miaoqian Lin <linmq006@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Thierry Reding <treding@nvidia.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] drm/mipi-dsi: Fix error handling in mipi_dsi_device_register_full
Date: Thu, 2 Jun 2022 09:11:09 +0200	[thread overview]
Message-ID: <ba8d5d00-0ef7-6133-e609-7942cdbd7c84@intel.com> (raw)
In-Reply-To: <20220601124024.10137-1-linmq006@gmail.com>



On 01.06.2022 14:40, Miaoqian Lin wrote:
> In mipi_dsi_device_alloc(), it calls device_initialize(&dsi->dev);
> We need to use put_device() instead freeing directly.
>
> Fixes: 068a002 ("drm: Add MIPI DSI bus support")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>

Looks correct.
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

Regards
Andrzej

> ---
>   drivers/gpu/drm/drm_mipi_dsi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
> index c40bde96cfdf..8cc8deca006f 100644
> --- a/drivers/gpu/drm/drm_mipi_dsi.c
> +++ b/drivers/gpu/drm/drm_mipi_dsi.c
> @@ -228,7 +228,7 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host,
>   	ret = mipi_dsi_device_add(dsi);
>   	if (ret) {
>   		drm_err(host, "failed to add DSI device %d\n", ret);
> -		kfree(dsi);
> +		put_device(&dsi->dev);
>   		return ERR_PTR(ret);
>   	}
>   


      reply	other threads:[~2022-06-02  7:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01 12:40 Miaoqian Lin
2022-06-02  7:11 ` Andrzej Hajda [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=ba8d5d00-0ef7-6133-e609-7942cdbd7c84@intel.com \
    --to=andrzej.hajda@intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linmq006@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=treding@nvidia.com \
    --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

all inboxes | Powered by JetHome®