* [PATCH] iommu/mediatek: Fix error code in probe()
@ 2021-02-05 12:46 Dan Carpenter
2021-02-07 1:45 ` Yong Wu
2021-02-08 8:11 ` Joerg Roedel
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-02-05 12:46 UTC (permalink / raw)
To: Joerg Roedel, Yong Wu
Cc: Will Deacon, Matthias Brugger, Tomasz Figa, iommu,
linux-arm-kernel, linux-mediatek, linux-kernel, kernel-janitors
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 <dan.carpenter@oracle.com>
---
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 0ad14a7604b1..5f78ac0dc30e 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;
}
--
2.30.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/mediatek: Fix error code in probe()
2021-02-05 12:46 [PATCH] iommu/mediatek: Fix error code in probe() Dan Carpenter
@ 2021-02-07 1:45 ` Yong Wu
2021-02-08 8:11 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Yong Wu @ 2021-02-07 1:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: Joerg Roedel, kernel-janitors, linux-kernel, Tomasz Figa, iommu,
linux-mediatek, Matthias Brugger, Will Deacon, linux-arm-kernel
On Fri, 2021-02-05 at 15:46 +0300, Dan Carpenter wrote:
> 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 <dan.carpenter@oracle.com>
Reviewed-by: Yong Wu <yong.wu@mediatek.com>
> ---
> 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 0ad14a7604b1..5f78ac0dc30e 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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iommu/mediatek: Fix error code in probe()
2021-02-05 12:46 [PATCH] iommu/mediatek: Fix error code in probe() Dan Carpenter
2021-02-07 1:45 ` Yong Wu
@ 2021-02-08 8:11 ` Joerg Roedel
1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2021-02-08 8:11 UTC (permalink / raw)
To: Dan Carpenter
Cc: Yong Wu, Will Deacon, Matthias Brugger, Tomasz Figa, iommu,
linux-arm-kernel, linux-mediatek, linux-kernel, kernel-janitors
On Fri, Feb 05, 2021 at 03:46:17PM +0300, Dan Carpenter wrote:
> drivers/iommu/mtk_iommu.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-08 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 12:46 [PATCH] iommu/mediatek: Fix error code in probe() Dan Carpenter
2021-02-07 1:45 ` Yong Wu
2021-02-08 8:11 ` Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).