All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: iommu@lists.linux-foundation.org
Cc: linux-arm-msm@vger.kernel.org, Rob Herring <robh@kernel.org>,
	Rob Clark <robdclark@gmail.com>
Subject: [PATCH] iommu: fix device remove
Date: Fri,  5 May 2017 14:08:37 -0400	[thread overview]
Message-ID: <20170505180837.11326-1-robdclark@gmail.com> (raw)

It looks like it *used* to make sense to free the device.  But now it is
embedded in 'struct iommu' (which is allocated or embedded in something
that the device allocated).

Spotted when testing qcom_iommu with CONFIG_DEBUG_TEST_DRIVER_REMOVE.

Fixes: 39ab955 ("iommu: Add sysfs bindings for struct iommu_device")
Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 drivers/iommu/iommu-sysfs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c
index c58351e..ad19cbb 100644
--- a/drivers/iommu/iommu-sysfs.c
+++ b/drivers/iommu/iommu-sysfs.c
@@ -34,7 +34,6 @@ static const struct attribute_group *iommu_dev_groups[] = {
 
 static void iommu_release_device(struct device *dev)
 {
-	kfree(dev);
 }
 
 static struct class iommu_class = {
-- 
2.9.3

             reply	other threads:[~2017-05-05 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 18:08 Rob Clark [this message]
2017-05-05 18:24 ` [PATCH] iommu: fix device remove Greg KH
     [not found]   ` <20170505182452.GA3575-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2017-05-05 18:56     ` Rob Clark
     [not found]       ` <CAF6AEGsTrOJG2+a=vPc8iLDPOK5rxQujS8wuoCEmBhgT7Zpb9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-05 19:58         ` Greg KH
2017-05-05 20:24           ` Rob Clark

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=20170505180837.11326-1-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.