netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: marvell: prestera: Fix a NULL vs IS_ERR() check in some functions
@ 2022-11-25  1:27 Shang XiaoJing
  2022-11-29 11:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Shang XiaoJing @ 2022-11-25  1:27 UTC (permalink / raw)
  To: tchornyi, davem, edumazet, kuba, pabeni, yevhen.orlov,
	oleksandr.mazur, netdev
  Cc: shangxiaojing

rhashtable_lookup_fast() returns NULL when failed instead of error
pointer.

Fixes: 396b80cb5cc8 ("net: marvell: prestera: Add neighbour cache accounting")
Fixes: 0a23ae237171 ("net: marvell: prestera: Add router nexthops ABI")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
---
 drivers/net/ethernet/marvell/prestera/prestera_router.c    | 2 +-
 drivers/net/ethernet/marvell/prestera/prestera_router_hw.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_router.c b/drivers/net/ethernet/marvell/prestera/prestera_router.c
index 4046be0e86ff..a9a1028cb17b 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_router.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_router.c
@@ -457,7 +457,7 @@ prestera_kern_neigh_cache_find(struct prestera_switch *sw,
 	n_cache =
 	 rhashtable_lookup_fast(&sw->router->kern_neigh_cache_ht, key,
 				__prestera_kern_neigh_cache_ht_params);
-	return IS_ERR(n_cache) ? NULL : n_cache;
+	return n_cache;
 }
 
 static void
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_router_hw.c b/drivers/net/ethernet/marvell/prestera/prestera_router_hw.c
index aa080dc57ff0..02faaea2aefa 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_router_hw.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_router_hw.c
@@ -330,7 +330,7 @@ prestera_nh_neigh_find(struct prestera_switch *sw,
 
 	nh_neigh = rhashtable_lookup_fast(&sw->router->nh_neigh_ht,
 					  key, __prestera_nh_neigh_ht_params);
-	return IS_ERR(nh_neigh) ? NULL : nh_neigh;
+	return nh_neigh;
 }
 
 struct prestera_nh_neigh *
@@ -484,7 +484,7 @@ __prestera_nexthop_group_find(struct prestera_switch *sw,
 
 	nh_grp = rhashtable_lookup_fast(&sw->router->nexthop_group_ht,
 					key, __prestera_nexthop_group_ht_params);
-	return IS_ERR(nh_grp) ? NULL : nh_grp;
+	return nh_grp;
 }
 
 static struct prestera_nexthop_group *
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: marvell: prestera: Fix a NULL vs IS_ERR() check in some functions
  2022-11-25  1:27 [PATCH] net: marvell: prestera: Fix a NULL vs IS_ERR() check in some functions Shang XiaoJing
@ 2022-11-29 11:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-11-29 11:40 UTC (permalink / raw)
  To: Shang XiaoJing
  Cc: tchornyi, davem, edumazet, kuba, pabeni, yevhen.orlov,
	oleksandr.mazur, netdev

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Fri, 25 Nov 2022 09:27:51 +0800 you wrote:
> rhashtable_lookup_fast() returns NULL when failed instead of error
> pointer.
> 
> Fixes: 396b80cb5cc8 ("net: marvell: prestera: Add neighbour cache accounting")
> Fixes: 0a23ae237171 ("net: marvell: prestera: Add router nexthops ABI")
> Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
> 
> [...]

Here is the summary with links:
  - net: marvell: prestera: Fix a NULL vs IS_ERR() check in some functions
    https://git.kernel.org/netdev/net/c/e493bec343fa

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] 2+ messages in thread

end of thread, other threads:[~2022-11-29 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25  1:27 [PATCH] net: marvell: prestera: Fix a NULL vs IS_ERR() check in some functions Shang XiaoJing
2022-11-29 11:40 ` patchwork-bot+netdevbpf

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).