From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Clark Subject: [PATCH] iommu: fix device remove Date: Fri, 5 May 2017 14:08:37 -0400 Message-ID: <20170505180837.11326-1-robdclark@gmail.com> Return-path: Received: from mail-qt0-f196.google.com ([209.85.216.196]:33267 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750805AbdEESIt (ORCPT ); Fri, 5 May 2017 14:08:49 -0400 Received: by mail-qt0-f196.google.com with SMTP id a46so1822810qte.0 for ; Fri, 05 May 2017 11:08:49 -0700 (PDT) Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: iommu@lists.linux-foundation.org Cc: linux-arm-msm@vger.kernel.org, Rob Herring , Rob Clark 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 --- 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