diff options
| author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2025-06-24 14:22:30 +0200 |
|---|---|---|
| committer | Joerg Roedel <joerg.roedel@amd.com> | 2025-06-27 09:21:42 +0200 |
| commit | 217d30bb8ee84feb0def7d31b93bce7ca52b5793 (patch) | |
| tree | e533dda6a829a8fe155fe4f95a44f49dc4b24208 | |
| parent | 86731a2a651e58953fc949573895f2fa6d456841 (diff) | |
iommu/omap: Drop redundant check if ti,syscon-mmuconfig exists
The syscon_regmap_lookup_by_phandle() will fail if property does not
exist, so doing of_property_read_bool() earlier is redundant. Drop that
check and move error message to syscon_regmap_lookup_by_phandle() error
case while converting it to dev_err_probe().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20250624-syscon-phandle-args-iommu-v3-1-1a36487d69b8@linaro.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| -rw-r--r-- | drivers/iommu/omap-iommu.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 3c62337f43c6..4448c0a51213 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -1123,23 +1123,15 @@ static int omap_iommu_dra7_get_dsp_system_cfg(struct platform_device *pdev, struct omap_iommu *obj) { struct device_node *np = pdev->dev.of_node; - int ret; if (!of_device_is_compatible(np, "ti,dra7-dsp-iommu")) return 0; - if (!of_property_read_bool(np, "ti,syscon-mmuconfig")) { - dev_err(&pdev->dev, "ti,syscon-mmuconfig property is missing\n"); - return -EINVAL; - } - obj->syscfg = syscon_regmap_lookup_by_phandle(np, "ti,syscon-mmuconfig"); - if (IS_ERR(obj->syscfg)) { - /* can fail with -EPROBE_DEFER */ - ret = PTR_ERR(obj->syscfg); - return ret; - } + if (IS_ERR(obj->syscfg)) + return dev_err_probe(&pdev->dev, PTR_ERR(obj->syscfg), + "ti,syscon-mmuconfig property is missing\n"); if (of_property_read_u32_index(np, "ti,syscon-mmuconfig", 1, &obj->id)) { |
