Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2398057pxb; Tue, 13 Apr 2021 00:28:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMT1PvI0AM+9PvpKc0nx+1dhzpCKlU9liaPwTq4BVVCEMqY7togXvSAb99jqdoilLNuAzc X-Received: by 2002:a17:906:11ce:: with SMTP id o14mr9814403eja.113.1618298936225; Tue, 13 Apr 2021 00:28:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618298936; cv=none; d=google.com; s=arc-20160816; b=x/lsbWkbhyYPtXXymkJwVb+971s7F9vSXQ2WNmAiAzTr05X5ZV54lFghKHTc/6k88n K1knEQ4MOiUMSk/7FFazq/4MSjpd3KCrdDNl1C0JID3WeN7o+xRJ/3t/PA30wtlBRLNl X7JFmsMiruwOZh108H2+oOVVscvjJ8I4kJNQ/V95QrbNv8mnq125th8CFOmh23VYCeSn LJ4K0csr9UgbbGp559Q7uwPGvIAa2zAk3UVxGQgGuQXAEuD/sNt0kEvkx7xCz8b1x5qc op1N2r7d1uu8IzhTHn5l48xkOYAbJWmb5s36wD+ykTyPZ3/4xN4j8nj5oH6HEAHKMRqc JoWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=BOkghOpH3oSdf0asxuL9LgEcAmiL1VL25ClibTKxa54=; b=1D8NsCuJFLl/Up28B7spSZVZBm3NlVGc28w7Z2eAUGS105+y0L1A6Ou8i1Lc37rcr5 l4wG1oKOtIXuL1ig8w7ge/Gy9ekgoYH1qYaipjKhvSolHHkPPjY15kw8/prWogBC7anP NdZSP4tXQVuUzo3Vc63p/QdOqwmRULly4ppziuCb1SBeNUbI3sIaehGZmh/rTTbk/2Dq Q3IhWB6jNDdTR3Zc9V9PrDIQ8lg6cfdtJLo0ag4T4inPJJy6YSRuymtq1jzaSihJu8rI +yDi7sYxQj+Z5aGfXFlY1fQYB9i2G7E4+FKws2xhQy1Mzf1mxlMBFblN8TduVmBohJs3 nxkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb24si2228981ejb.158.2021.04.13.00.28.30; Tue, 13 Apr 2021 00:28:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241881AbhDLXSA (ORCPT + 99 others); Mon, 12 Apr 2021 19:18:00 -0400 Received: from mail-m17635.qiye.163.com ([59.111.176.35]:55184 "EHLO mail-m17635.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236404AbhDLXR7 (ORCPT ); Mon, 12 Apr 2021 19:17:59 -0400 Received: from wanjb-KLV-WX9.lan (unknown [60.232.195.58]) by mail-m17635.qiye.163.com (Hmail) with ESMTPA id E9FB64000CF; Tue, 13 Apr 2021 07:17:37 +0800 (CST) From: Wan Jiabing To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Alexey Budankov , linux-kernel@vger.kernel.org Cc: kael_w@yeah.net, Wan Jiabing Subject: [PATCH] perf: util: Remove unneeded variable Date: Tue, 13 Apr 2021 07:16:52 +0800 Message-Id: <20210412231654.42084-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZGhlLH1YdGUpMQhlOH08aTU5VEwETFhoSFyQUDg9ZV1kWGg8SFR0UWUFZT0tIVUpKS0 hKTFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MTY6Ihw4HT8XQx4OKEIDMEkP AhcKCQNVSlVKTUpDSU1CT05DQk5MVTMWGhIXVQwaFRESGhkSFRw7DRINFFUYFBZFWVdZEgtZQVlN S1VJSElVSkJOVU5DWVdZCAFZQUlJQ0I3Bg++ X-HM-Tid: 0a78c8605098d991kuwse9fb64000cf Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix coccicheck warning: ./tools/perf/util/evlist.c:1316:5-8: Unneeded variable: "err". Return "- ENOMEM" on line 1341 Signed-off-by: Wan Jiabing --- tools/perf/util/evlist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 882cd1f721d9..6c2a271605d5 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1313,7 +1313,6 @@ static int evlist__create_syswide_maps(struct evlist *evlist) { struct perf_cpu_map *cpus; struct perf_thread_map *threads; - int err = -ENOMEM; /* * Try reading /sys/devices/system/cpu/online to get @@ -1338,7 +1337,7 @@ static int evlist__create_syswide_maps(struct evlist *evlist) out_put: perf_cpu_map__put(cpus); out: - return err; + return -ENOMEM; } int evlist__open(struct evlist *evlist) -- 2.30.2