Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752577AbdI1LLt (ORCPT ); Thu, 28 Sep 2017 07:11:49 -0400 Received: from goliath.siemens.de ([192.35.17.28]:53899 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751831AbdI1LLs (ORCPT ); Thu, 28 Sep 2017 07:11:48 -0400 To: Steven Rostedt , Linux Kernel Mailing List From: Jan Kiszka Subject: [PATCH] Don't set wildcard filter for non-existing module Message-ID: <4b13012c-8b08-8eb4-2cbd-0abdd1699af6@siemens.com> Date: Thu, 28 Sep 2017 13:11:40 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 655 Lines: 26 From: Jan Kiszka If filter_mod is NULL, there is no need to add it to the list. This avoids premature termination of trace-cmd on systems without CONFIG_DYNAMIC_FTRACE. Signed-off-by: Jan Kiszka --- trace-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace-record.c b/trace-record.c index 020a373..a0b6541 100644 --- a/trace-record.c +++ b/trace-record.c @@ -4680,7 +4680,7 @@ void trace_record (int argc, char **argv) } } - if (!filtered) + if (!filtered && instance->filter_mod) add_func(&instance->filter_funcs, instance->filter_mod, "*"); -- 2.12.3