From patchwork Sat Mar 26 18:54:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 8674701 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D7AE29F44D for ; Sat, 26 Mar 2016 18:55:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15CED20279 for ; Sat, 26 Mar 2016 18:55:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2E8620274 for ; Sat, 26 Mar 2016 18:55:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753619AbcCZSzk (ORCPT ); Sat, 26 Mar 2016 14:55:40 -0400 Received: from mga11.intel.com ([192.55.52.93]:57273 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751009AbcCZSzj (ORCPT ); Sat, 26 Mar 2016 14:55:39 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 26 Mar 2016 11:55:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,396,1455004800"; d="scan'208";a="676047809" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by FMSMGA003.fm.intel.com with ESMTP; 26 Mar 2016 11:55:38 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1ajtN0-000WP5-1Z; Sun, 27 Mar 2016 02:55:34 +0800 Date: Sun, 27 Mar 2016 02:54:23 +0800 From: kbuild test robot To: Mike Marshall Cc: kbuild-all@01.org, linux-fsdevel@vger.kernel.org, pvfs2-developers@beowulf-underground.org, linux-kernel@vger.kernel.org Subject: [PATCH] Orangefs: fix ifnullfree.cocci warnings Message-ID: <20160326185423.GA91872@lkp-hsx03> References: <201603270220.V8jU4hSN%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201603270220.V8jU4hSN%fengguang.wu@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. 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 Signed-off-by: Fengguang Wu --- orangefs-debugfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/fs/orangefs/orangefs-debugfs.c +++ b/fs/orangefs/orangefs-debugfs.c @@ -126,8 +126,7 @@ out: void orangefs_debugfs_cleanup(void) { - if (debug_dir) - debugfs_remove_recursive(debug_dir); + debugfs_remove_recursive(debug_dir); } /* open ORANGEFS_KMOD_DEBUG_HELP_FILE */