From: "joro@8bytes.org" <joro@8bytes.org>
To: wen yang <yellowriver2010@hotmail.com>
Cc: "iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Magnus Damm <damm+renesas@opensource.se>
Subject: Re: [PATCH] iommu/ipmmu-vmsa: fix device reference leaks
Date: Mon, 11 Feb 2019 11:24:15 +0100 [thread overview]
Message-ID: <20190211102414.GZ32526@8bytes.org> (raw)
In-Reply-To: <HK0PR02MB3634F6AE1FAE6B86EF82B291B26C0@HK0PR02MB3634.apcprd02.prod.outlook.com>
Adding a few more people to Cc.
On Sun, Feb 03, 2019 at 10:27:09AM +0000, wen yang wrote:
> Make sure to drop the reference to the device taken by
> of_find_device_by_node() on driver unbind.
>
> Signed-off-by: Wen Yang <yellowriver2010@hotmail.com>
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: iommu@lists.linux-foundation.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/iommu/ipmmu-vmsa.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
> index 7a4529c..cebf56d 100644
> --- a/drivers/iommu/ipmmu-vmsa.c
> +++ b/drivers/iommu/ipmmu-vmsa.c
> @@ -756,6 +756,9 @@ static int ipmmu_init_platform_device(struct device *dev,
>
> fwspec->iommu_priv = platform_get_drvdata(ipmmu_pdev);
>
> + if (!fwspec->iommu_priv)
> + put_device(&ipmmu_pdev->dev);
> +
> return 0;
> }
>
> --
> 2.7.4
next prev parent reply other threads:[~2019-02-11 10:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-03 10:27 [PATCH] iommu/ipmmu-vmsa: fix device reference leaks wen yang
2019-02-11 10:24 ` joro [this message]
2019-02-12 16:47 ` Laurent Pinchart
[not found] ` <20190212164722.GT6279-N3hz7ZxfLydczECFQUw77jytWr6r+dGw0E9HWUfgJXw@public.gmane.org>
2019-02-15 13:20 ` Wen Yang
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=20190211102414.GZ32526@8bytes.org \
--to=joro@8bytes.org \
--cc=damm+renesas@opensource.se \
--cc=iommu@lists.linux-foundation.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yellowriver2010@hotmail.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;
as well as URLs for NNTP newsgroup(s).