diff mbox series

[-next] iommu: remove set but not used variable 'data'

Message ID 20200508020231.143664-1-chenzhou10@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] iommu: remove set but not used variable 'data' | expand

Commit Message

chenzhou May 8, 2020, 2:02 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/iommu/mtk_iommu_v1.c:467:25:
warning: variable ‘data’ set but not used [-Wunused-but-set-variable]
  struct mtk_iommu_data *data;

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
 drivers/iommu/mtk_iommu_v1.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index 7bdd74c7cb9f..36cc1d9667a2 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -464,12 +464,11 @@  static void mtk_iommu_probe_finalize(struct device *dev)
 static void mtk_iommu_release_device(struct device *dev)
 {
 	struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
-	struct mtk_iommu_data *data;
 
 	if (!fwspec || fwspec->ops != &mtk_iommu_ops)
 		return;
 
-	data = dev_iommu_priv_get(dev);
+	dev_iommu_priv_get(dev);
 	iommu_fwspec_free(dev);
 }