* [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
@ 2019-01-23 6:19 ` Wei Yongjun
0 siblings, 0 replies; 12+ messages in thread
From: Wei Yongjun @ 2019-01-23 6:19 UTC (permalink / raw)
To: Vinod Koul, Niklas Cassel, Giuseppe Cavallaro, Alexandre Torgue,
Jose Abreu, Maxime Coquelin
Cc: Wei Yongjun, netdev, linux-stm32, linux-arm-kernel, kernel-janitors
In case of error, the function devm_clk_get() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 30724bd..7ec8954 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
ethqos->por = of_device_get_match_data(&pdev->dev);
ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
- if (!ethqos->rgmii_clk) {
- ret = -ENOMEM;
+ if (IS_ERR(ethqos->rgmii_clk)) {
+ ret = PTR_ERR(ethqos->rgmii_clk);
goto err_mem;
}
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
@ 2019-01-23 6:19 ` Wei Yongjun
0 siblings, 0 replies; 12+ messages in thread
From: Wei Yongjun @ 2019-01-23 6:19 UTC (permalink / raw)
To: Vinod Koul, Niklas Cassel, Giuseppe Cavallaro, Alexandre Torgue,
Jose Abreu, Maxime Coquelin
Cc: netdev, kernel-janitors, Wei Yongjun, linux-stm32, linux-arm-kernel
In case of error, the function devm_clk_get() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 30724bd..7ec8954 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
ethqos->por = of_device_get_match_data(&pdev->dev);
ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
- if (!ethqos->rgmii_clk) {
- ret = -ENOMEM;
+ if (IS_ERR(ethqos->rgmii_clk)) {
+ ret = PTR_ERR(ethqos->rgmii_clk);
goto err_mem;
}
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
@ 2019-01-23 6:19 ` Wei Yongjun
0 siblings, 0 replies; 12+ messages in thread
From: Wei Yongjun @ 2019-01-23 6:19 UTC (permalink / raw)
To: Vinod Koul, Niklas Cassel, Giuseppe Cavallaro, Alexandre Torgue,
Jose Abreu, Maxime Coquelin
Cc: netdev, kernel-janitors, Wei Yongjun, linux-stm32, linux-arm-kernel
In case of error, the function devm_clk_get() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 30724bd..7ec8954 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
ethqos->por = of_device_get_match_data(&pdev->dev);
ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
- if (!ethqos->rgmii_clk) {
- ret = -ENOMEM;
+ if (IS_ERR(ethqos->rgmii_clk)) {
+ ret = PTR_ERR(ethqos->rgmii_clk);
goto err_mem;
}
_______________________________________________
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] 12+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
2019-01-23 6:19 ` Wei Yongjun
(?)
@ 2019-01-23 8:30 ` Vinod Koul
-1 siblings, 0 replies; 12+ messages in thread
From: Vinod Koul @ 2019-01-23 8:30 UTC (permalink / raw)
To: Wei Yongjun, davem
Cc: Niklas Cassel, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
Maxime Coquelin, netdev, linux-stm32, linux-arm-kernel,
kernel-janitors
On 23-01-19, 06:19, Wei Yongjun wrote:
> In case of error, the function devm_clk_get() returns ERR_PTR() and
> never returns NULL. The NULL test in the return value check should be
> replaced with IS_ERR().
Acked-by: Vinod Koul <vkoul@kernel.org>
This is a networking subsystem patch and you missed Dave :(
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 30724bd..7ec8954 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
> ethqos->por = of_device_get_match_data(&pdev->dev);
>
> ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
> - if (!ethqos->rgmii_clk) {
> - ret = -ENOMEM;
> + if (IS_ERR(ethqos->rgmii_clk)) {
> + ret = PTR_ERR(ethqos->rgmii_clk);
> goto err_mem;
> }
>
>
--
~Vinod
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
@ 2019-01-23 8:30 ` Vinod Koul
0 siblings, 0 replies; 12+ messages in thread
From: Vinod Koul @ 2019-01-23 8:30 UTC (permalink / raw)
To: Wei Yongjun, davem
Cc: Alexandre Torgue, netdev, kernel-janitors, Jose Abreu,
Maxime Coquelin, Niklas Cassel, Giuseppe Cavallaro, linux-stm32,
linux-arm-kernel
On 23-01-19, 06:19, Wei Yongjun wrote:
> In case of error, the function devm_clk_get() returns ERR_PTR() and
> never returns NULL. The NULL test in the return value check should be
> replaced with IS_ERR().
Acked-by: Vinod Koul <vkoul@kernel.org>
This is a networking subsystem patch and you missed Dave :(
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 30724bd..7ec8954 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
> ethqos->por = of_device_get_match_data(&pdev->dev);
>
> ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
> - if (!ethqos->rgmii_clk) {
> - ret = -ENOMEM;
> + if (IS_ERR(ethqos->rgmii_clk)) {
> + ret = PTR_ERR(ethqos->rgmii_clk);
> goto err_mem;
> }
>
>
--
~Vinod
_______________________________________________
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] 12+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
@ 2019-01-23 8:30 ` Vinod Koul
0 siblings, 0 replies; 12+ messages in thread
From: Vinod Koul @ 2019-01-23 8:42 UTC (permalink / raw)
To: Wei Yongjun, davem
Cc: Alexandre Torgue, netdev, kernel-janitors, Jose Abreu,
Maxime Coquelin, Niklas Cassel, Giuseppe Cavallaro, linux-stm32,
linux-arm-kernel
On 23-01-19, 06:19, Wei Yongjun wrote:
> In case of error, the function devm_clk_get() returns ERR_PTR() and
> never returns NULL. The NULL test in the return value check should be
> replaced with IS_ERR().
Acked-by: Vinod Koul <vkoul@kernel.org>
This is a networking subsystem patch and you missed Dave :(
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 30724bd..7ec8954 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
> ethqos->por = of_device_get_match_data(&pdev->dev);
>
> ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
> - if (!ethqos->rgmii_clk) {
> - ret = -ENOMEM;
> + if (IS_ERR(ethqos->rgmii_clk)) {
> + ret = PTR_ERR(ethqos->rgmii_clk);
> goto err_mem;
> }
>
>
--
~Vinod
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
2019-01-23 6:19 ` Wei Yongjun
(?)
@ 2019-01-23 10:39 ` Niklas Cassel
-1 siblings, 0 replies; 12+ messages in thread
From: Niklas Cassel @ 2019-01-23 10:39 UTC (permalink / raw)
To: Wei Yongjun
Cc: Vinod Koul, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
Maxime Coquelin, netdev, linux-stm32, linux-arm-kernel,
kernel-janitors
On Wed, Jan 23, 2019 at 06:19:18AM +0000, Wei Yongjun wrote:
> In case of error, the function devm_clk_get() returns ERR_PTR() and
> never returns NULL. The NULL test in the return value check should be
> replaced with IS_ERR().
>
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 30724bd..7ec8954 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
> ethqos->por = of_device_get_match_data(&pdev->dev);
>
> ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
> - if (!ethqos->rgmii_clk) {
> - ret = -ENOMEM;
> + if (IS_ERR(ethqos->rgmii_clk)) {
> + ret = PTR_ERR(ethqos->rgmii_clk);
> goto err_mem;
> }
>
>
>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
@ 2019-01-23 10:39 ` Niklas Cassel
0 siblings, 0 replies; 12+ messages in thread
From: Niklas Cassel @ 2019-01-23 10:39 UTC (permalink / raw)
To: Wei Yongjun
Cc: Alexandre Torgue, netdev, kernel-janitors, Vinod Koul,
Jose Abreu, Maxime Coquelin, Giuseppe Cavallaro, linux-stm32,
linux-arm-kernel
On Wed, Jan 23, 2019 at 06:19:18AM +0000, Wei Yongjun wrote:
> In case of error, the function devm_clk_get() returns ERR_PTR() and
> never returns NULL. The NULL test in the return value check should be
> replaced with IS_ERR().
>
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 30724bd..7ec8954 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
> ethqos->por = of_device_get_match_data(&pdev->dev);
>
> ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
> - if (!ethqos->rgmii_clk) {
> - ret = -ENOMEM;
> + if (IS_ERR(ethqos->rgmii_clk)) {
> + ret = PTR_ERR(ethqos->rgmii_clk);
> goto err_mem;
> }
>
>
>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
@ 2019-01-23 10:39 ` Niklas Cassel
0 siblings, 0 replies; 12+ messages in thread
From: Niklas Cassel @ 2019-01-23 10:39 UTC (permalink / raw)
To: Wei Yongjun
Cc: Alexandre Torgue, netdev, kernel-janitors, Vinod Koul,
Jose Abreu, Maxime Coquelin, Giuseppe Cavallaro, linux-stm32,
linux-arm-kernel
On Wed, Jan 23, 2019 at 06:19:18AM +0000, Wei Yongjun wrote:
> In case of error, the function devm_clk_get() returns ERR_PTR() and
> never returns NULL. The NULL test in the return value check should be
> replaced with IS_ERR().
>
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 30724bd..7ec8954 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -473,8 +473,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
> ethqos->por = of_device_get_match_data(&pdev->dev);
>
> ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii");
> - if (!ethqos->rgmii_clk) {
> - ret = -ENOMEM;
> + if (IS_ERR(ethqos->rgmii_clk)) {
> + ret = PTR_ERR(ethqos->rgmii_clk);
> goto err_mem;
> }
>
>
>
Acked-by: Niklas Cassel <niklas.cassel@linaro.org>
_______________________________________________
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] 12+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
2019-01-23 6:19 ` Wei Yongjun
(?)
@ 2019-01-25 6:13 ` David Miller
-1 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2019-01-25 6:13 UTC (permalink / raw)
To: weiyongjun1
Cc: vkoul, niklas.cassel, peppe.cavallaro, alexandre.torgue, joabreu,
mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
kernel-janitors
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Wed, 23 Jan 2019 06:19:18 +0000
> In case of error, the function devm_clk_get() returns ERR_PTR() and
> never returns NULL. The NULL test in the return value check should be
> replaced with IS_ERR().
>
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
@ 2019-01-25 6:13 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2019-01-25 6:13 UTC (permalink / raw)
To: weiyongjun1
Cc: alexandre.torgue, netdev, kernel-janitors, vkoul, joabreu,
mcoquelin.stm32, niklas.cassel, peppe.cavallaro, linux-stm32,
linux-arm-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Wed, 23 Jan 2019 06:19:18 +0000
> In case of error, the function devm_clk_get() returns ERR_PTR() and
> never returns NULL. The NULL test in the return value check should be
> replaced with IS_ERR().
>
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe()
@ 2019-01-25 6:13 ` David Miller
0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2019-01-25 6:13 UTC (permalink / raw)
To: weiyongjun1
Cc: alexandre.torgue, netdev, kernel-janitors, vkoul, joabreu,
mcoquelin.stm32, niklas.cassel, peppe.cavallaro, linux-stm32,
linux-arm-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Wed, 23 Jan 2019 06:19:18 +0000
> In case of error, the function devm_clk_get() returns ERR_PTR() and
> never returns NULL. The NULL test in the return value check should be
> replaced with IS_ERR().
>
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Applied, 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] 12+ messages in thread
end of thread, other threads:[~2019-01-25 6:13 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 6:19 [PATCH net-next] net: stmmac: Fix return value check in qcom_ethqos_probe() Wei Yongjun
2019-01-23 6:19 ` Wei Yongjun
2019-01-23 6:19 ` Wei Yongjun
2019-01-23 8:30 ` Vinod Koul
2019-01-23 8:42 ` Vinod Koul
2019-01-23 8:30 ` Vinod Koul
2019-01-23 10:39 ` Niklas Cassel
2019-01-23 10:39 ` Niklas Cassel
2019-01-23 10:39 ` Niklas Cassel
2019-01-25 6:13 ` David Miller
2019-01-25 6:13 ` David Miller
2019-01-25 6:13 ` David Miller
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.