projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d2c749
)
iommu/mediatek: Remove unnecessary check in attach_device
author
Yong Wu
<yong.wu@mediatek.com>
Mon, 11 Jan 2021 11:19:12 +0000
(19:19 +0800)
committer
Will Deacon
<will@kernel.org>
Mon, 1 Feb 2021 11:31:19 +0000
(11:31 +0000)
This priv_data is set in the of_xlate. if of_xlate failed, it should
not enter attach_device. remove the unnecessary check.
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Link:
https://lore.kernel.org/r/20210111111914.22211-32-yong.wu@mediatek.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/mtk_iommu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/mtk_iommu.c
b/drivers/iommu/mtk_iommu.c
index 7403a7cb90ea714abca909902058e36254970550..084fb4394ffc39acb6cdd7afdfd0bcefee5cd411 100644
(file)
--- a/
drivers/iommu/mtk_iommu.c
+++ b/
drivers/iommu/mtk_iommu.c
@@
-453,9
+453,6
@@
static int mtk_iommu_attach_device(struct iommu_domain *domain,
struct device *m4udev = data->dev;
int ret, domid;
- if (!data)
- return -ENODEV;
-
domid = mtk_iommu_get_domain_id(dev, data->plat_data);
if (domid < 0)
return domid;
@@
-492,9
+489,6
@@
static void mtk_iommu_detach_device(struct iommu_domain *domain,
{
struct mtk_iommu_data *data = dev_iommu_priv_get(dev);
- if (!data)
- return;
-
mtk_iommu_config(data, dev, false, 0);
}