From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Miaoqian Lin <linmq006@gmail.com>
Cc: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Abhinav Kumar <abhinavk@codeaurora.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Dan Carpenter <dan.carpenter@oracle.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Hai Li <hali@codeaurora.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/msm/dsi: Fix missing put_device() call in dsi_get_phy
Date: Thu, 20 Jan 2022 02:16:22 +0300 [thread overview]
Message-ID: <5db5b998-9563-be71-e87f-d906bf8b438b@linaro.org> (raw)
In-Reply-To: <20211230070943.18116-1-linmq006@gmail.com>
On 30/12/2021 10:09, Miaoqian Lin wrote:
> If of_find_device_by_node() succeeds, dsi_get_phy() doesn't
> a corresponding put_device(). Thus add put_device() to fix the exception
> handling.
>
> Fixes: ec31abf ("drm/msm/dsi: Separate PHY to another platform device")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/gpu/drm/msm/dsi/dsi.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c
> index 75ae3008b68f..35be526e907a 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi.c
> @@ -40,7 +40,12 @@ static int dsi_get_phy(struct msm_dsi *msm_dsi)
>
> of_node_put(phy_node);
>
> - if (!phy_pdev || !msm_dsi->phy) {
> + if (!phy_pdev) {
> + DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__);
> + return -EPROBE_DEFER;
> + }
> + if (!msm_dsi->phy) {
> + put_device(&phy_pdev->dev);
> DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n", __func__);
> return -EPROBE_DEFER;
> }
--
With best wishes
Dmitry
prev parent reply other threads:[~2022-01-19 23:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-30 7:09 Miaoqian Lin
2022-01-19 23:16 ` Dmitry Baryshkov [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=5db5b998-9563-be71-e87f-d906bf8b438b@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=abhinavk@codeaurora.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dan.carpenter@oracle.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=hali@codeaurora.org \
--cc=linmq006@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
/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®