diff mbox series

[-next] net: prestera: acl: fix return value check in prestera_acl_rule_entry_find()

Message ID 20211203070418.465144-1-yangyingliang@huawei.com (mailing list archive)
State Accepted
Commit f6882b8fac60f928fda51efc64274463806f956c
Delegated to: Netdev Maintainers
Headers show
Series [-next] net: prestera: acl: fix return value check in prestera_acl_rule_entry_find() | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 1 blamed authors not CCed: yevhen.orlov@plvision.eu; 1 maintainers not CCed: yevhen.orlov@plvision.eu
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Yang Yingliang Dec. 3, 2021, 7:04 a.m. UTC
rhashtable_lookup_fast() returns NULL pointer not ERR_PTR().
Return rhashtable_lookup_fast() directly to fix this.

Fixes: 47327e198d42 ("net: prestera: acl: migrate to new vTCAM api")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/ethernet/marvell/prestera/prestera_acl.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Dec. 3, 2021, 2:30 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri, 3 Dec 2021 15:04:18 +0800 you wrote:
> rhashtable_lookup_fast() returns NULL pointer not ERR_PTR().
> Return rhashtable_lookup_fast() directly to fix this.
> 
> Fixes: 47327e198d42 ("net: prestera: acl: migrate to new vTCAM api")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> 
> [...]

Here is the summary with links:
  - [-next] net: prestera: acl: fix return value check in prestera_acl_rule_entry_find()
    https://git.kernel.org/netdev/net-next/c/f6882b8fac60

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_acl.c b/drivers/net/ethernet/marvell/prestera/prestera_acl.c
index da0b6525ef9a..fc7f2fedafd7 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_acl.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_acl.c
@@ -419,11 +419,8 @@  struct prestera_acl_rule_entry *
 prestera_acl_rule_entry_find(struct prestera_acl *acl,
 			     struct prestera_acl_rule_entry_key *key)
 {
-	struct prestera_acl_rule_entry *e;
-
-	e = rhashtable_lookup_fast(&acl->acl_rule_entry_ht, key,
-				   __prestera_acl_rule_entry_ht_params);
-	return IS_ERR(e) ? NULL : e;
+	return rhashtable_lookup_fast(&acl->acl_rule_entry_ht, key,
+				      __prestera_acl_rule_entry_ht_params);
 }
 
 static int __prestera_acl_rule_entry2hw_del(struct prestera_switch *sw,