Make sure that _have_tracepoint() uses the argument passed to that
function instead of using an undefined variable.

Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com>
---
 common/rc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/rc b/common/rc
index 7f1728025364..7592400dda82 100644
--- a/common/rc
+++ b/common/rc
@@ -112,6 +112,8 @@ _have_tracefs() {
 }
 
 _have_tracepoint() {
+       local event=$1
+
        if [[ ! -d /sys/kernel/debug/tracing/events/${event} ]]; then
                SKIP_REASON="tracepoint ${event} does not exist"
                return 1
-- 
2.17.1

Reply via email to