summaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/hashmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/bpf/hashmap.c')
-rw-r--r--tools/lib/bpf/hashmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/lib/bpf/hashmap.c b/tools/lib/bpf/hashmap.c
index 3c20b126d60d..aeb09c288716 100644
--- a/tools/lib/bpf/hashmap.c
+++ b/tools/lib/bpf/hashmap.c
@@ -75,7 +75,7 @@ void hashmap__clear(struct hashmap *map)
void hashmap__free(struct hashmap *map)
{
- if (!map)
+ if (IS_ERR_OR_NULL(map))
return;
hashmap__clear(map);
@@ -238,4 +238,3 @@ bool hashmap__delete(struct hashmap *map, const void *key,
return true;
}
-