From: sunran001@208suo.com
To: robdclark@gmail.com, quic_abhinavk@quicinc.com,
dmitry.baryshkov@linaro.org, airlied@gmail.com, daniel@ffwll.ch
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm/msm/dsi: add missing put_device()
Date: Tue, 18 Jul 2023 16:13:12 +0800 [thread overview]
Message-ID: <c07be8cdf5ceceeec6bc7918774c18e0@208suo.com> (raw)
In-Reply-To: <20230718081139.16918-1-xujianghui@cdjrlc.com>
The of_find_device_by_node() takes a reference to the underlying device
structure, we should release that reference.
Detected by coccinelle with the following ERROR:
./drivers/gpu/drm/msm/dsi/dsi.c:50:1-7: ERROR: missing put_device; call
of_find_device_by_node on line 32, but without a corresponding object
release within this function.
Signed-off-by: Ran Sun <sunran001@208suo.com>
---
drivers/gpu/drm/msm/dsi/dsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi.c
b/drivers/gpu/drm/msm/dsi/dsi.c
index baab79ab6e74..81461e8852a7 100644
--- a/drivers/gpu/drm/msm/dsi/dsi.c
+++ b/drivers/gpu/drm/msm/dsi/dsi.c
@@ -46,7 +46,7 @@ static int dsi_get_phy(struct msm_dsi *msm_dsi)
DRM_DEV_ERROR(&pdev->dev, "%s: phy driver is not ready\n",
__func__);
return -EPROBE_DEFER;
}
-
+ put_device(&pdev->dev);
return 0;
}
next parent reply other threads:[~2023-07-18 8:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230718081139.16918-1-xujianghui@cdjrlc.com>
2023-07-18 8:13 ` sunran001 [this message]
2023-07-18 8:15 ` Dmitry Baryshkov
[not found] <20230718083149.17178-1-xujianghui@cdjrlc.com>
2023-07-18 8:33 ` sunran001
2023-07-18 8:35 ` Dmitry Baryshkov
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=c07be8cdf5ceceeec6bc7918774c18e0@208suo.com \
--to=sunran001@208suo.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@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®