* [PATCH -next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw()
@ 2022-04-08 3:22 ` Yang Yingliang
0 siblings, 0 replies; 6+ messages in thread
From: Yang Yingliang @ 2022-04-08 3:22 UTC (permalink / raw)
To: linux-kernel, netdev, linux-mediatek, linux-arm-kernel; +Cc: nbd, davem
If syscon_regmap_lookup_by_phandle() fails, it never return NULL pointer,
change the check to IS_ERR().
Fixes: 804775dfc288 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/ethernet/mediatek/mtk_wed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c
index f0eacf819cd9..5d510ac24f2a 100644
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -813,7 +813,7 @@ void mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth,
return;
regs = syscon_regmap_lookup_by_phandle(np, NULL);
- if (!regs)
+ if (IS_ERR(regs))
return;
rcu_assign_pointer(mtk_soc_wed_ops, &wed_ops);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH -next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw()
@ 2022-04-08 3:22 ` Yang Yingliang
0 siblings, 0 replies; 6+ messages in thread
From: Yang Yingliang @ 2022-04-08 3:22 UTC (permalink / raw)
To: linux-kernel, netdev, linux-mediatek, linux-arm-kernel; +Cc: nbd, davem
If syscon_regmap_lookup_by_phandle() fails, it never return NULL pointer,
change the check to IS_ERR().
Fixes: 804775dfc288 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/ethernet/mediatek/mtk_wed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c
index f0eacf819cd9..5d510ac24f2a 100644
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -813,7 +813,7 @@ void mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth,
return;
regs = syscon_regmap_lookup_by_phandle(np, NULL);
- if (!regs)
+ if (IS_ERR(regs))
return;
rcu_assign_pointer(mtk_soc_wed_ops, &wed_ops);
--
2.25.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH -next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw()
@ 2022-04-08 3:22 ` Yang Yingliang
0 siblings, 0 replies; 6+ messages in thread
From: Yang Yingliang @ 2022-04-08 3:22 UTC (permalink / raw)
To: linux-kernel, netdev, linux-mediatek, linux-arm-kernel; +Cc: nbd, davem
If syscon_regmap_lookup_by_phandle() fails, it never return NULL pointer,
change the check to IS_ERR().
Fixes: 804775dfc288 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/ethernet/mediatek/mtk_wed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_wed.c b/drivers/net/ethernet/mediatek/mtk_wed.c
index f0eacf819cd9..5d510ac24f2a 100644
--- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -813,7 +813,7 @@ void mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth,
return;
regs = syscon_regmap_lookup_by_phandle(np, NULL);
- if (!regs)
+ if (IS_ERR(regs))
return;
rcu_assign_pointer(mtk_soc_wed_ops, &wed_ops);
--
2.25.1
_______________________________________________
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] 6+ messages in thread
* Re: [PATCH -next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw()
2022-04-08 3:22 ` Yang Yingliang
(?)
@ 2022-04-11 9:50 ` patchwork-bot+netdevbpf
-1 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-11 9:50 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, netdev, linux-mediatek, linux-arm-kernel, nbd, davem
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Fri, 8 Apr 2022 11:22:46 +0800 you wrote:
> If syscon_regmap_lookup_by_phandle() fails, it never return NULL pointer,
> change the check to IS_ERR().
>
> Fixes: 804775dfc288 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>
> [...]
Here is the summary with links:
- [-next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw()
https://git.kernel.org/netdev/net-next/c/b559edfaf3f3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw()
@ 2022-04-11 9:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-11 9:50 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, netdev, linux-mediatek, linux-arm-kernel, nbd, davem
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Fri, 8 Apr 2022 11:22:46 +0800 you wrote:
> If syscon_regmap_lookup_by_phandle() fails, it never return NULL pointer,
> change the check to IS_ERR().
>
> Fixes: 804775dfc288 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>
> [...]
Here is the summary with links:
- [-next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw()
https://git.kernel.org/netdev/net-next/c/b559edfaf3f3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH -next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw()
@ 2022-04-11 9:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-11 9:50 UTC (permalink / raw)
To: Yang Yingliang
Cc: linux-kernel, netdev, linux-mediatek, linux-arm-kernel, nbd, davem
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Fri, 8 Apr 2022 11:22:46 +0800 you wrote:
> If syscon_regmap_lookup_by_phandle() fails, it never return NULL pointer,
> change the check to IS_ERR().
>
> Fixes: 804775dfc288 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
>
> [...]
Here is the summary with links:
- [-next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw()
https://git.kernel.org/netdev/net-next/c/b559edfaf3f3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
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] 6+ messages in thread
end of thread, other threads:[~2022-04-11 10:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 3:22 [PATCH -next] net: ethernet: mtk_eth_soc: fix return value check in mtk_wed_add_hw() Yang Yingliang
2022-04-08 3:22 ` Yang Yingliang
2022-04-08 3:22 ` Yang Yingliang
2022-04-11 9:50 ` patchwork-bot+netdevbpf
2022-04-11 9:50 ` patchwork-bot+netdevbpf
2022-04-11 9:50 ` patchwork-bot+netdevbpf
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.