Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932969AbbFWXm2 (ORCPT ); Tue, 23 Jun 2015 19:42:28 -0400 Received: from mga14.intel.com ([192.55.52.115]:23467 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932359AbbFWXmT (ORCPT ); Tue, 23 Jun 2015 19:42:19 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,669,1427785200"; d="scan'208";a="752066553" Date: Wed, 24 Jun 2015 07:41:07 +0800 From: kbuild test robot To: "Eric W. Biederman" Cc: kbuild-all@01.org, Casey Schaufler , James Morris , "Serge E. Hallyn" , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] sysfs: fix simple_return.cocci warnings Message-ID: <20150623234107.GA102996@lkp-sb04> References: <201506240705.vNc0oiCA%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201506240705.vNc0oiCA%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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 981 Lines: 33 security/smack/smackfs.c:2251:1-4: WARNING: end returns can be simpified and declaration on line 2250 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Fengguang Wu --- smackfs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -2247,11 +2247,7 @@ static const struct file_operations smk_ */ static int smk_init_sysfs(void) { - int err; - err = sysfs_create_mount_point(fs_kobj, "smackfs"); - if (err) - return err; - return 0; + return sysfs_create_mount_point(fs_kobj, "smackfs"); } /** -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/