Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5704676ybi; Sun, 7 Jul 2019 10:40:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0pw6HFompud3ul8snqq7YPnjnsjHzTGb8H7AcaAPmmSgN/5xTd/AJ7y7eUB06iIW9ONb7 X-Received: by 2002:a17:90a:20a2:: with SMTP id f31mr19506930pjg.90.1562521251196; Sun, 07 Jul 2019 10:40:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562521251; cv=none; d=google.com; s=arc-20160816; b=lEYQahmXmqzvkKYC/apkkDe9NCzJjF7bNG9HMrzOUm2upeQnJaWIhchvKQxp1eh8kz M9Y4UlSTfMGR9T0U0t0XS6du7bBjZHD7lutz4Bad3p1sxJLOZ4Mo1Nq2Afl6WcQvFuHN bLrfSOlq148CjpDiHy+GpHck4XbIESQ4vzN5aonmNK4YwUSfEsmeZ7uvgbGCgHExGfMn oslMqBXLaiYn+oicRn3FEUCawhZVf1p2xU4pj96VvWbGKzKG8MK2I9203ocZJLJvDLsT fMhj0jQWRsxiLdbjRiHrYRDdP/rqswrsRsP+txg/HRQK4JoNvZ864nr8mDNtD8U8eiY6 1+DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=+H3EwQDvibyGT8VL7ulArXRE3p6zMOo1Ib9nIk/vgdY=; b=DYFtsxsMRPmhKa/6H+t+Eo9/zCeFjO6RWHdbzcd1+s3sO0Upy0S7iL0f8U8Zhe8wVx yrbgclHbFwHeKp9+1PYIfBfPpNgAJT2CujhlzHU9r6ctD2m2NqXHlzXQiIBJakW+PnmH RpVz6OwpTqjfPfWv+twDiDt9f54Xju1o609nLUob/R8XSWwJg6UMHwsURLthiYG+kwGS gfWWjg77moc6N4u8JGcmUWRv+rNdySx68GPldSmwvTclTdRc8bxIJMtzb5WZZahjSY7H e/u5EKJlU/LY2+gn2dh7d+VjfYL7HRlpHvEju+RVbG5pPU+bwgJAEteUbPgd1B9M5GwE kIJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-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 f23si16523126pga.449.2019.07.07.10.40.25; Sun, 07 Jul 2019 10:40:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727341AbfGGQpk (ORCPT + 99 others); Sun, 7 Jul 2019 12:45:40 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:59302 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727335AbfGGQpk (ORCPT ); Sun, 7 Jul 2019 12:45:40 -0400 X-IronPort-AV: E=Sophos;i="5.63,463,1557180000"; d="scan'208";a="390776152" Received: from abo-12-105-68.mrs.modulonet.fr (HELO hadrien) ([85.68.105.12]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jul 2019 18:45:38 +0200 Date: Sun, 7 Jul 2019 18:45:38 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Trond Myklebust cc: Anna Schumaker , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, kbuild-all@01.org Subject: [PATCH] NFS: fix ifnullfree.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: kbuild test robot fs/nfs/sysfs.c:125:2-7: WARNING: NULL check before some freeing functions is not needed. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: bf11fbdb20b3 ("NFS: Add sysfs support for per-container identifier") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next head: c433a7975cfc839906aaa891f68d86ca228f7e43 commit: bf11fbdb20b385157b046ea7781f04d0c62554a3 [30/57] NFS: Add sysfs support for per-container identifier :::::: branch date: 22 hours ago :::::: commit date: 22 hours ago Please take the patch only if it's a positive warning. Thanks! sysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/nfs/sysfs.c +++ b/fs/nfs/sysfs.c @@ -121,8 +121,7 @@ static void nfs_netns_client_release(str struct nfs_netns_client, kobject); - if (c->identifier) - kfree(c->identifier); + kfree(c->identifier); kfree(c); }