From: Michael Jeanson Date: Mon, 30 Nov 2020 19:46:07 +0000 (-0500) Subject: Fix: handle default switch case with -EINVAL in lttng-syscalls X-Git-Tag: v2.13.0-rc1~69 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6866b1c778967d8fe21fe4545aed1c67d7f4129d;p=lttng-modules.git Fix: handle default switch case with -EINVAL in lttng-syscalls Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: I7768ea3d0da259976548f6b9417350227390b3be --- diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index 2c40ae1c..6ce669f5 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -1935,6 +1935,9 @@ int lttng_syscall_filter_enable_event_notifier( case LTTNG_SYSCALL_ABI_COMPAT: dispatch_list = &group->event_notifier_compat_syscall_dispatch[syscall_id]; break; + default: + ret = -EINVAL; + goto end; } break; case LTTNG_SYSCALL_EXIT: @@ -1945,8 +1948,14 @@ int lttng_syscall_filter_enable_event_notifier( case LTTNG_SYSCALL_ABI_COMPAT: dispatch_list = &group->event_notifier_exit_compat_syscall_dispatch[syscall_id]; break; + default: + ret = -EINVAL; + goto end; } break; + default: + ret = -EINVAL; + goto end; } hlist_add_head_rcu(¬ifier->u.syscall.node, dispatch_list);