Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755233AbbGDFzJ (ORCPT ); Sat, 4 Jul 2015 01:55:09 -0400 Received: from mout.web.de ([212.227.15.4]:56086 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754653AbbGDFy7 (ORCPT ); Sat, 4 Jul 2015 01:54:59 -0400 Message-ID: <5597751A.5000506@users.sourceforge.net> Date: Sat, 04 Jul 2015 07:54:34 +0200 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo , Ingo Molnar , Masami Hiramatsu , Peter Zijlstra CC: LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: [PATCH] perf probe: Delete an unnecessary check before the function call "strfilter__delete" References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <546A2C5C.8080800@users.sourceforge.net> In-Reply-To: <546A2C5C.8080800@users.sourceforge.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ILfboD2zRFM70JlwJdqsLLZ84W9wQDY/aisB+aKwKDMjyVlW3F/ pIJshJLXf9u5sx87WObfiUUXypX+gAJ92vLwzCtG9TiAneiHWrVsWYHlitmmPzwM3WdZU3j TWnqkKa0ghpf662JhX/qCVdcaE1hWCdowVf8rODTVym6G3ghw3YwZwV5OlH9yALgKUaEBvn 7984RDidSBaMQZab0aVzw== X-UI-Out-Filterresults: notjunk:1;V01:K0:6tW59o6n10w=:SiZFuLHUR20fK3UM1CgejX p4ULL87uBqqJgNoDOdkjnyf8eXD4CBqpFqN/jz6ggiBhM5PK4Mdg5LhVbMT+nR8oUiFQyh9il U9GQzamMnGUu0mW1EXbuVEaElScbN2V93yCRaeW6KQfHnck7wAuBvxO7e3BXU9yQOJTy/0BKc x86WxCn+JN8CByz+F+VxdTOeH5dKcLBWuq8SUr53laE9VyR09jZyHlzXldBYDjmBIcI+LjzDr zYhqz8NKao8FqT/ZSFlnsCAN3R4PhA8qJkcz0MEcP8Bl071FKk7QonJPDyMLJtmrCDU+QrSch FqNjL89MRIcv7JvlAKEkTC0l2hQ9pp55p0RcA2oa6NdcKYyJTO7HF/bK/7hzvl8QC+D6Xna13 NfmWxa+dIxm/D1XsR/bC2r7R+5lm3ChkwY5QmAA9GCf2vxpTejFM1odG4Mxr/T1eVJDECZGPu A0wX8I2pwovpx2A25imk7UGj9ScIiOIFTF32XXJsLI0oiMWYWieJ4YfFcUQdaogRlOIr6NCy4 IA2MDZ2Tn6jsVUWDgYtugbwiqY8Hz3ihGiomRQnbc6iaY71GV1x45NE+VWUgYUxx+SwdkT2Qo onu17EPf3W7QrY3CFYqgeTdp3RR7dfm+NSVnIIDwVM5+/nvaOYeSoCeHCNWi0p9J/NAHXPbU5 oaVb1ikjt+n141as3R/Zk+jum4dQClRTcHF/gyyZhDDJZntRVAWt5RaOeuB3nrvuIrvE= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1166 Lines: 35 From: Markus Elfring Date: Sat, 4 Jul 2015 07:44:22 +0200 The strfilter__delete() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- tools/perf/builtin-probe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 1272559..b81cec3 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -297,8 +297,7 @@ static void cleanup_params(void) clear_perf_probe_event(params.events + i); line_range__clear(¶ms.line_range); free(params.target); - if (params.filter) - strfilter__delete(params.filter); + strfilter__delete(params.filter); memset(¶ms, 0, sizeof(params)); } -- 2.4.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/