From: sunran001@208suo.com
To: joro@8bytes.org, will@kernel.org, matthias.bgg@gmail.com
Cc: iommu@lists.linux.dev, linux-mediatek@lists.infradead.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] iommu/mtk_iommu_v1: add missing put_device()
Date: Tue, 18 Jul 2023 16:28:26 +0800 [thread overview]
Message-ID: <36b3ef1e2a73f84216d9fa656f6146a6@208suo.com> (raw)
In-Reply-To: <20230718082500.17066-1-xujianghui@cdjrlc.com>
The of_find_device_by_node() takes a reference to the underlying device
structure, we should release that reference.
./drivers/iommu/mtk_iommu_v1.c:669:3-9: ERROR: missing put_device; call
of_find_device_by_node on line 662, but without a corresponding object
release within this function.
Signed-off-by: Ran Sun <sunran001@208suo.com>
---
drivers/iommu/mtk_iommu_v1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index 8a0a5e5d049f..1833d0ce7afe 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -666,6 +666,7 @@ static int mtk_iommu_v1_probe(struct platform_device
*pdev)
}
if (!plarbdev->dev.driver) {
of_node_put(larbnode);
+ put_device(&plarbdev->dev);
return -EPROBE_DEFER;
}
data->larb_imu[i].dev = &plarbdev->dev;
parent reply other threads:[~2023-07-18 8:28 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20230718082500.17066-1-xujianghui@cdjrlc.com>]
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=36b3ef1e2a73f84216d9fa656f6146a6@208suo.com \
--to=sunran001@208suo.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=will@kernel.org \
/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®