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

From: Chen Zhou
Date: Thu May 07 2020 - 21:58:51 EST


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@xxxxxxxxxx>
Signed-off-by: Chen Zhou <chenzhou10@xxxxxxxxxx>
---
drivers/iommu/mtk_iommu_v1.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

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);
}

--
2.20.1