From patchwork Mon Dec 12 18:15:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Shishkin X-Patchwork-Id: 9471007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AC3EC60476 for ; Mon, 12 Dec 2016 18:18:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E04A27F85 for ; Mon, 12 Dec 2016 18:18:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92BFB284E7; Mon, 12 Dec 2016 18:18:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37E5827F85 for ; Mon, 12 Dec 2016 18:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165AbcLLSSZ (ORCPT ); Mon, 12 Dec 2016 13:18:25 -0500 Received: from mail-wj0-f195.google.com ([209.85.210.195]:32943 "EHLO mail-wj0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111AbcLLSSY (ORCPT ); Mon, 12 Dec 2016 13:18:24 -0500 Received: by mail-wj0-f195.google.com with SMTP id kp2so12913621wjc.0 for ; Mon, 12 Dec 2016 10:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OreKxcz5IUuajEo1lile/AxzHGfx3tDbWP79D86TF/w=; b=XE/YKaKXVlNhTRSuY08HW6nyS1US0Rm59GFO700WPhjo9mpRKfELwzvT1Dvjg9sOmQ C9Rw64cuLHXvTrCNzaBxIxVTUUM6Wy0D7Tex/oEOJgkFMhuoid/4fN17Gpg48EoOEicM U/D3+Uw2f+xeEhzLG7LsCiMobJlKTWLWDnUEK9jUhi3oSuWFwaKWO7gGih+WhvifS4pq Hm2YALuYhdgT8x6Vhq1D++pQup22kLDoLLPsLAAEBz/IcyfDoGpTO3jVpmr/yl5lLo8/ gtkICAMbIIGM8a0kvMApjv9atQUO9IswR1JIQHEmhu07bBtyOiwZVAxCa2psruVHzJgA 2e+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OreKxcz5IUuajEo1lile/AxzHGfx3tDbWP79D86TF/w=; b=MRfySR5GjJve0RTOzaN0siKfVTikmMa//dMwz9BOGptjjQWM8iAgCZLUtMfuJ2CDNS IsikfTaoNuQ/VQhzSj5YSjBPaF5bHRC5/2tx+CNddwobxYkCiRXA8MwPYGg4X45bvtif GIajdp9HJROUE8bqEMnf5l7+YmwJpvWbw6tcdE7feiQydAAXLx6KWDAYCvzZFKKWBkfL L+bkx3zRBlIaN9F8PywDMnyyZPmUiOM/p+6xxlCuGbdpSWIrvlNFgl3aabDJM+14SKve ZKz+VOGjdteGFYqJlV4heRQ6LDVzxowehA4WF6r8hckW7IgwBGbWeqb2dvRAlciotfCf 4VKw== X-Gm-Message-State: AKaTC03ZdCCDa/AafcCzWEvqxG2Yf+xL1aNJX6uy51vNRgtJN4M8xrpBe9DOgAl/3TCRRQ== X-Received: by 10.194.171.104 with SMTP id at8mr81776422wjc.159.1481566703389; Mon, 12 Dec 2016 10:18:23 -0800 (PST) Received: from zeta.huawei.com (h-213.61.75.66.host.de.colt.net. [213.61.75.66]) by smtp.gmail.com with ESMTPSA id kp5sm58432667wjb.8.2016.12.12.10.18.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Dec 2016 10:18:22 -0800 (PST) From: edward.shishkin@gmail.com To: Eric Van Hensbergen , V9FS Developers Mailing List , Linux Filesystem Development List Cc: QEMU Developers Mailing List , ZhangWei , Claudio Fontana , Greg Kurz , Alexander Graf , kbuild test robot , Eduard Shishkin Subject: [PATCH 4/7] 9p: v9fs fix odd_ptr_err.cocci warnings Date: Mon, 12 Dec 2016 19:15:39 +0100 Message-Id: <1481566542-25894-4-git-send-email-edward.shishkin@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481566542-25894-1-git-send-email-edward.shishkin@gmail.com> References: <1481566542-25894-1-git-send-email-edward.shishkin@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot fs/9p/vfs_super.c:145:6-12: inconsistent IS_ERR and PTR_ERR on line 146. PTR_ERR should access the value just tested by IS_ERR Semantic patch information: There can be false positives in the patch case, where it is the call to IS_ERR that is wrong. Generated by: scripts/coccinelle/tests/odd_ptr_err.cocci Signed-off-by: Fengguang Wu Signed-off-by: Eduard Shishkin --- fs/9p/vfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index c1f9af1..24aacec 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c @@ -143,7 +143,7 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags, if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { retval = alloc_init_flush_set(v9ses); if (IS_ERR(v9ses->flush)) { - retval = PTR_ERR(fid); + retval = PTR_ERR(v9ses->flush); goto release_sb; } sb->s_d_op = &v9fs_cached_dentry_operations;