* [PATCH] phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
@ 2021-05-17 13:20 ` Tiezhu Yang
0 siblings, 0 replies; 8+ messages in thread
From: Tiezhu Yang @ 2021-05-17 13:20 UTC (permalink / raw)
To: Chunfeng Yun, Kishon Vijay Abraham I, Vinod Koul, Matthias Brugger
Cc: linux-arm-kernel, linux-mediatek, linux-phy, linux-kernel, lkp,
Dan Carpenter, Heiko Stuebner, kbuild
Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix
some resource leaks.
Fixes: cd4ec4b03dc1 ("phy: phy-mt65xx-usb3: add mediatek directory and rename file")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/phy/mediatek/phy-mtk-tphy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index cdbcc49..731c483 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
break;
default:
dev_err(tphy->dev, "incompatible PHY type\n");
+ clk_disable_unprepare(instance->ref_clk);
+ clk_disable_unprepare(instance->da_ref_clk);
return -EINVAL;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
@ 2021-05-17 13:20 ` Tiezhu Yang
0 siblings, 0 replies; 8+ messages in thread
From: Tiezhu Yang @ 2021-05-17 13:20 UTC (permalink / raw)
To: Chunfeng Yun, Kishon Vijay Abraham I, Vinod Koul, Matthias Brugger
Cc: linux-arm-kernel, linux-mediatek, linux-phy, linux-kernel, lkp,
Dan Carpenter, Heiko Stuebner, kbuild
Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix
some resource leaks.
Fixes: cd4ec4b03dc1 ("phy: phy-mt65xx-usb3: add mediatek directory and rename file")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/phy/mediatek/phy-mtk-tphy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index cdbcc49..731c483 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
break;
default:
dev_err(tphy->dev, "incompatible PHY type\n");
+ clk_disable_unprepare(instance->ref_clk);
+ clk_disable_unprepare(instance->da_ref_clk);
return -EINVAL;
}
--
2.1.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
@ 2021-05-17 13:20 ` Tiezhu Yang
0 siblings, 0 replies; 8+ messages in thread
From: Tiezhu Yang @ 2021-05-17 13:20 UTC (permalink / raw)
To: Chunfeng Yun, Kishon Vijay Abraham I, Vinod Koul, Matthias Brugger
Cc: linux-arm-kernel, linux-mediatek, linux-phy, linux-kernel, lkp,
Dan Carpenter, Heiko Stuebner, kbuild
Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix
some resource leaks.
Fixes: cd4ec4b03dc1 ("phy: phy-mt65xx-usb3: add mediatek directory and rename file")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/phy/mediatek/phy-mtk-tphy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index cdbcc49..731c483 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
break;
default:
dev_err(tphy->dev, "incompatible PHY type\n");
+ clk_disable_unprepare(instance->ref_clk);
+ clk_disable_unprepare(instance->da_ref_clk);
return -EINVAL;
}
--
2.1.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
@ 2021-05-17 13:20 ` Tiezhu Yang
0 siblings, 0 replies; 8+ messages in thread
From: Tiezhu Yang @ 2021-05-17 13:20 UTC (permalink / raw)
To: Chunfeng Yun, Kishon Vijay Abraham I, Vinod Koul, Matthias Brugger
Cc: linux-arm-kernel, linux-mediatek, linux-phy, linux-kernel, lkp,
Dan Carpenter, Heiko Stuebner, kbuild
Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix
some resource leaks.
Fixes: cd4ec4b03dc1 ("phy: phy-mt65xx-usb3: add mediatek directory and rename file")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
drivers/phy/mediatek/phy-mtk-tphy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index cdbcc49..731c483 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
break;
default:
dev_err(tphy->dev, "incompatible PHY type\n");
+ clk_disable_unprepare(instance->ref_clk);
+ clk_disable_unprepare(instance->da_ref_clk);
return -EINVAL;
}
--
2.1.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
2021-05-17 13:20 ` Tiezhu Yang
(?)
(?)
@ 2021-05-19 2:46 ` Chunfeng Yun
-1 siblings, 0 replies; 8+ messages in thread
From: Chunfeng Yun @ 2021-05-19 2:46 UTC (permalink / raw)
To: Tiezhu Yang
Cc: Kishon Vijay Abraham I, Vinod Koul, Matthias Brugger,
linux-arm-kernel, linux-mediatek, linux-phy, linux-kernel, lkp,
Dan Carpenter, Heiko Stuebner, kbuild
On Mon, 2021-05-17 at 21:20 +0800, Tiezhu Yang wrote:
> Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix
> some resource leaks.
>
> Fixes: cd4ec4b03dc1 ("phy: phy-mt65xx-usb3: add mediatek directory and rename file")
No need add Fixes tag, there is no da_ref_clk when apply this patch,
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> drivers/phy/mediatek/phy-mtk-tphy.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
> index cdbcc49..731c483 100644
> --- a/drivers/phy/mediatek/phy-mtk-tphy.c
> +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
> @@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
> break;
> default:
> dev_err(tphy->dev, "incompatible PHY type\n");
> + clk_disable_unprepare(instance->ref_clk);
> + clk_disable_unprepare(instance->da_ref_clk);
> return -EINVAL;
> }
>
after removing Fixes tag,
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Thanks
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
@ 2021-05-19 2:46 ` Chunfeng Yun
0 siblings, 0 replies; 8+ messages in thread
From: Chunfeng Yun @ 2021-05-19 2:46 UTC (permalink / raw)
To: Tiezhu Yang
Cc: Kishon Vijay Abraham I, Vinod Koul, Matthias Brugger,
linux-arm-kernel, linux-mediatek, linux-phy, linux-kernel, lkp,
Dan Carpenter, Heiko Stuebner, kbuild
On Mon, 2021-05-17 at 21:20 +0800, Tiezhu Yang wrote:
> Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix
> some resource leaks.
>
> Fixes: cd4ec4b03dc1 ("phy: phy-mt65xx-usb3: add mediatek directory and rename file")
No need add Fixes tag, there is no da_ref_clk when apply this patch,
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> drivers/phy/mediatek/phy-mtk-tphy.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
> index cdbcc49..731c483 100644
> --- a/drivers/phy/mediatek/phy-mtk-tphy.c
> +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
> @@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
> break;
> default:
> dev_err(tphy->dev, "incompatible PHY type\n");
> + clk_disable_unprepare(instance->ref_clk);
> + clk_disable_unprepare(instance->da_ref_clk);
> return -EINVAL;
> }
>
after removing Fixes tag,
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Thanks
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
@ 2021-05-19 2:46 ` Chunfeng Yun
0 siblings, 0 replies; 8+ messages in thread
From: Chunfeng Yun @ 2021-05-19 2:46 UTC (permalink / raw)
To: Tiezhu Yang
Cc: Kishon Vijay Abraham I, Vinod Koul, Matthias Brugger,
linux-arm-kernel, linux-mediatek, linux-phy, linux-kernel, lkp,
Dan Carpenter, Heiko Stuebner, kbuild
On Mon, 2021-05-17 at 21:20 +0800, Tiezhu Yang wrote:
> Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix
> some resource leaks.
>
> Fixes: cd4ec4b03dc1 ("phy: phy-mt65xx-usb3: add mediatek directory and rename file")
No need add Fixes tag, there is no da_ref_clk when apply this patch,
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> drivers/phy/mediatek/phy-mtk-tphy.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
> index cdbcc49..731c483 100644
> --- a/drivers/phy/mediatek/phy-mtk-tphy.c
> +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
> @@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
> break;
> default:
> dev_err(tphy->dev, "incompatible PHY type\n");
> + clk_disable_unprepare(instance->ref_clk);
> + clk_disable_unprepare(instance->da_ref_clk);
> return -EINVAL;
> }
>
after removing Fixes tag,
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Thanks
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init()
@ 2021-05-19 2:46 ` Chunfeng Yun
0 siblings, 0 replies; 8+ messages in thread
From: Chunfeng Yun @ 2021-05-19 2:46 UTC (permalink / raw)
To: Tiezhu Yang
Cc: Kishon Vijay Abraham I, Vinod Koul, Matthias Brugger,
linux-arm-kernel, linux-mediatek, linux-phy, linux-kernel, lkp,
Dan Carpenter, Heiko Stuebner, kbuild
On Mon, 2021-05-17 at 21:20 +0800, Tiezhu Yang wrote:
> Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix
> some resource leaks.
>
> Fixes: cd4ec4b03dc1 ("phy: phy-mt65xx-usb3: add mediatek directory and rename file")
No need add Fixes tag, there is no da_ref_clk when apply this patch,
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> drivers/phy/mediatek/phy-mtk-tphy.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
> index cdbcc49..731c483 100644
> --- a/drivers/phy/mediatek/phy-mtk-tphy.c
> +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
> @@ -949,6 +949,8 @@ static int mtk_phy_init(struct phy *phy)
> break;
> default:
> dev_err(tphy->dev, "incompatible PHY type\n");
> + clk_disable_unprepare(instance->ref_clk);
> + clk_disable_unprepare(instance->da_ref_clk);
> return -EINVAL;
> }
>
after removing Fixes tag,
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Thanks
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-05-19 2:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 13:20 [PATCH] phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init() Tiezhu Yang
2021-05-17 13:20 ` Tiezhu Yang
2021-05-17 13:20 ` Tiezhu Yang
2021-05-17 13:20 ` Tiezhu Yang
2021-05-19 2:46 ` Chunfeng Yun
2021-05-19 2:46 ` Chunfeng Yun
2021-05-19 2:46 ` Chunfeng Yun
2021-05-19 2:46 ` Chunfeng Yun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.