summaryrefslogtreecommitdiff
path: root/tools/perf/util/expr.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-04-07 14:47:40 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2025-04-07 15:35:48 +0300
commit1afba39f9305fe4061a4e70baa6ebab9d41459da (patch)
tree67e7ed686bd75adc559025870151c4de6d649ced /tools/perf/util/expr.c
parentfbe43810d563a293e3de301141d33caf1f5d5c5a (diff)
parent0af2f6be1b4281385b618cb86ad946eded089ac8 (diff)
downloadlinux-1afba39f9305fe4061a4e70baa6ebab9d41459da.tar.xz
Merge drm/drm-next into drm-misc-next
Backmerging to get v6.15-rc1 into drm-misc-next. Also fixes a build issue when enabling CONFIG_DRM_SCHED_KUNIT_TEST. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'tools/perf/util/expr.c')
-rw-r--r--tools/perf/util/expr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/expr.c b/tools/perf/util/expr.c
index c221dcce6666..6413537442aa 100644
--- a/tools/perf/util/expr.c
+++ b/tools/perf/util/expr.c
@@ -215,6 +215,8 @@ int expr__add_ref(struct expr_parse_ctx *ctx, struct metric_ref *ref)
int expr__get_id(struct expr_parse_ctx *ctx, const char *id,
struct expr_id_data **data)
{
+ if (!ctx || !id)
+ return -1;
return hashmap__find(ctx->ids, id, data) ? 0 : -1;
}