Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6486564imm; Mon, 23 Jul 2018 19:57:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf/pxmsoDHBnNxRtXJEmGvFyDsGKKKwb3DSouZH5Pj0K0H8HGoWzeaA5WZ6mwGbnus6+9BT X-Received: by 2002:a62:8a4f:: with SMTP id y76-v6mr15848943pfd.233.1532401042478; Mon, 23 Jul 2018 19:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532401042; cv=none; d=google.com; s=arc-20160816; b=Y6DPXIhdjuYqT4vVIaqNrHhOpHfFBJbGVciaji52s/K88nfIKcZusJU5zFFOWPjiLA vtRVfZjwqEpleIe3iaz5aup0mLXXr6Z7zqkk80gZRt4HQk9I88LoRAgLAapxecNrMayt eAdknJISnRJvNfMJGQ7H61BkIuEsh/BRu4HY60FlF4YlitpPt+rYsc9OklR1tnhrmdo6 vsPXx/PqCwA1MkjCkwgaxNetAOqdPneLSYRY+ASvHRnoLDAkTWofdlXTCpCgLgqoXkcs qex1A1WbJKzwJ3QGkckK3oddIQVMezL6ufaGje031ysn4NwU1nTphm9UTfGG8pltjSTl gDFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=aT1Oc+gQVOWf9CSSqBMgxqqjIZIEoVF3UuWjadKl1p8=; b=tuALtD6Ld3RJ81tDrhAAQVwy1Qg1rseATiRojH1d52AZiAeNRGqvifD9wrDrogt0v0 giyWfKSu3p4IXM27CUMkNO2Mg97RZ8XZ+LNL8tzL9lVGfYhPdWgTEjHOAW2GG/93Ft0l H2GjFF8ypV7ciVZKk/rq39W7Q/fmYK1+wAvcijxdGLt+Mo6YoPMb22HlXSh33okM2B+D Kd6XJcSnqVClje9+wFukKIr7os9hDz320wD42nXQO8pvyM4YyIEaDSsmSbwDrqUbAHCG ejvPqEGztgWSqFeK8n2bESd3XOYa9sBzalvFQtDpUqPtkdtAswJdKxlm2+UcFoWOJ3A3 Nu0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z28-v6si11067369pfa.161.2018.07.23.19.57.07; Mon, 23 Jul 2018 19:57:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388415AbeGXEAc (ORCPT + 99 others); Tue, 24 Jul 2018 00:00:32 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9673 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725199AbeGXEAc (ORCPT ); Tue, 24 Jul 2018 00:00:32 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8999C89D43A29; Tue, 24 Jul 2018 10:56:14 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.382.0; Tue, 24 Jul 2018 10:55:38 +0800 From: YueHaibing To: , , , , , CC: , , , YueHaibing Subject: [PATCH bpf-next] bpf: btf: fix inconsistent IS_ERR and PTR_ERR Date: Tue, 24 Jul 2018 10:55:24 +0800 Message-ID: <20180724025524.22012-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix inconsistent IS_ERR and PTR_ERR in get_btf, the proper pointer to be passed as argument is '*btf' This issue was detected with the help of Coccinelle. Fixes: 2d3feca8c44f ("bpf: btf: print map dump and lookup with btf info") Signed-off-by: YueHaibing --- tools/bpf/bpftool/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index 9c81918..0ee3ba4 100644 --- a/tools/bpf/bpftool/map.c +++ b/tools/bpf/bpftool/map.c @@ -230,7 +230,7 @@ static int get_btf(struct bpf_map_info *map_info, struct btf **btf) *btf = btf__new((__u8 *)btf_info.btf, btf_info.btf_size, NULL); if (IS_ERR(*btf)) { - err = PTR_ERR(btf); + err = PTR_ERR(*btf); *btf = NULL; } -- 2.7.0