From 9a2ce7cfa29cc65942b33b4afe0b799e4f58c2dd Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 5 Feb 2021 15:46:17 +0300 Subject: [PATCH] UPSTREAM: iommu/mediatek: Fix error code in probe() This error path is supposed to return -EINVAL. It used to return directly but we added some clean up and accidentally removed the error code. Also I fixed a typo in the error message. Fixes: c0b57581b73b ("iommu/mediatek: Add power-domain operation") Signed-off-by: Dan Carpenter Reviewed-by: Yong Wu Link: https://lore.kernel.org/r/YB0+GU5akSdu29Vu@mwanda Signed-off-by: Joerg Roedel (cherry picked from commit a92a90ac62d3284a8deaef43c6ea4dbd5dd878b0) BUG=b:174513569 Signed-off-by: Yong Wu Change-Id: I65e9f85408625df6c827ef835089d847a8ab7257 --- drivers/iommu/mtk_iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 1f262621ef19..6ecc007f07cd 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -886,7 +886,8 @@ static int mtk_iommu_probe(struct platform_device *pdev) link = device_link_add(data->smicomm_dev, dev, DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME); if (!link) { - dev_err(dev, "Unable link %s.\n", dev_name(data->smicomm_dev)); + dev_err(dev, "Unable to link %s.\n", dev_name(data->smicomm_dev)); + ret = -EINVAL; goto out_runtime_disable; }