Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752153AbbFYNNg (ORCPT ); Thu, 25 Jun 2015 09:13:36 -0400 Received: from h2.hallyn.com ([78.46.35.8]:50246 "EHLO h2.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751023AbbFYNN1 (ORCPT ); Thu, 25 Jun 2015 09:13:27 -0400 Date: Thu, 25 Jun 2015 08:13:26 -0500 From: "Serge E. Hallyn" To: kbuild test robot Cc: "Eric W. Biederman" , kbuild-all@01.org, Casey Schaufler , James Morris , "Serge E. Hallyn" , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sysfs: fix simple_return.cocci warnings Message-ID: <20150625131326.GB25232@mail.hallyn.com> References: <201506240705.vNc0oiCA%fengguang.wu@intel.com> <20150623234107.GA102996@lkp-sb04> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150623234107.GA102996@lkp-sb04> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1158 Lines: 37 On Wed, Jun 24, 2015 at 07:41:07AM +0800, kbuild test robot wrote: > 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 Acked-by: Serge Hallyn > --- > > 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/